From 194734e9e5501f9a295212b91978eee396879cda Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 15 May 2002 11:00:30 +0200 Subject: invoke.texi (-malign-double): Re-add lost warning. * invoke.texi (-malign-double): Re-add lost warning. * i386-protos.h (x86_output_mi_thunk): Declare. * unix.h (ASM_OUTPUT_MI_THUNK): Move offline to ... * i386.c (x86_output_mi_thunk): ... here; handle 64bits. * dwarf2out.c (output_call_frame_info): Do not skip unwind info when flag_asynchronous_unwind_tables is set. * flags.h (flag_reorder_functions): Declare. * function.c (prepare_function_start): Initialize frequnecy. * params.def (HOT_BB_COUNT_FRACTION, HOT_BB_FREQUENCY_FRACTION): New paramters. * Makefile.in (predict.o): Add dependency on target.h and params.h * defaults.h (HOT_TEXT_SECTION_NAME, UNLIKELY_EXECUTED_TEXT_SECTION_NAME): New macros. * predict.c (choose_function_section): New function. (estimate_bb_frequencies): Use it. * toplev.c (flag_reorder_functions): New global variable. (lang_independent_options): New. (parse_options_and_default_flags): Set. * varasm.c (assemble_start_function): Bypass functdion alignment for never executed functions. * invoke.texi (-freorder-blocks, -freorder-functions): Document. (param hot-bb-count-fraction, hot-bb-frequency-fraction): New. * tm.texi (HOT_TEXT_SECTION_NAME, UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Document. Thu Jan 3 21:52:09 CET 2002 Jan Hubicka * predict.c: Inlude profile.h (MIN_COUNT): Rename to MIN_COUNT_FRACTION (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p): Use the information about maximal counter in the program. Thu Dec 20 22:14:00 CET 2001 Jan Hubicka * basic-block.h (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p): New functions. * cfgcleanup.c (outgoing_edges_match): Use them. * predict.c (MIN_COUNT, MIN_FREQUENCY): New macros. (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p): New functions. * function.h (function): Add new field function_frequency. * predict.c (compute_function_frequency): New function. (estimate_probability): Call it. From-SVN: r53478 --- gcc/toplev.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/toplev.c') diff --git a/gcc/toplev.c b/gcc/toplev.c index 9213730..5f5eb46 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -381,6 +381,10 @@ int flag_branch_probabilities = 0; int flag_reorder_blocks = 0; +/* Nonzero if functions should be reordered. */ + +int flag_reorder_functions = 0; + /* Nonzero if registers should be renamed. */ int flag_rename_registers = 0; @@ -1076,6 +1080,8 @@ static const lang_independent_options f_options[] = N_("Enable basic program profiling code") }, {"reorder-blocks", &flag_reorder_blocks, 1, N_("Reorder basic blocks to improve code placement") }, + {"reorder-functions", &flag_reorder_functions, 1, + N_("Reorder functions to improve code placement") }, {"rename-registers", &flag_rename_registers, 1, N_("Do the register renaming optimization pass") }, {"cprop-registers", &flag_cprop_registers, 1, @@ -4657,6 +4663,7 @@ parse_options_and_default_flags (argc, argv) flag_strict_aliasing = 1; flag_delete_null_pointer_checks = 1; flag_reorder_blocks = 1; + flag_reorder_functions = 1; } if (optimize >= 3) -- cgit v1.1