diff options
author | Jan Hubicka <jh@suse.cz> | 2010-11-23 17:06:37 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-11-23 16:06:37 +0000 |
commit | f16d3f392e1b5a317ac75dbed2b9cb81d79bc50f (patch) | |
tree | 152a6dc3dab8ba9ba276a0b044af0fa1b93bb32b /gcc/predict.c | |
parent | 7f814c0bb0216cf3c6929ae28bffcc4620ea2fef (diff) | |
download | gcc-f16d3f392e1b5a317ac75dbed2b9cb81d79bc50f.zip gcc-f16d3f392e1b5a317ac75dbed2b9cb81d79bc50f.tar.gz gcc-f16d3f392e1b5a317ac75dbed2b9cb81d79bc50f.tar.bz2 |
tree.h (DECL_HAS_IMPLICIT_SECTION_NAME_P): New macro.
* tree.h (DECL_HAS_IMPLICIT_SECTION_NAME_P): New macro.
(tree_decl_with_vis): Add implicit_section_name_p.
* targhooks.h (default_function_section): Declare.
* target.def (function_section): New hook.
* defaults.h (HOT_TEXT_SECTION_NAME,
UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Remove.
* predict.c (choose_function_section): Remove.
(estimate_bb_frequencies): Do not use choose_function_section.
* coretypes.h (enum node_frequency): Move here from cgraph.h
* cgraph.h (enum node_frequency): Remove.
* varasm.c (initialize_cold_section_name, unlikely_text_section,
unlikely_text_section_p): Remove.
(named_subsection_entry): New structure.
(get_text_section): New function.
(default_function_section): New function.
(function_section_1): Break out from ...; handle profile info.
(function_section): ... here.
(unlikely_text_section): Remove.
(unlikely_text_section_p): Use function_section_1.
(assemble_start_function): Do not initialize cold section.
(default_section_type_flags): Do not special case cold subsection.
(switch_to_section): Likewise.
* output.h (get_text_section): Define.
* config/i386/winnt.c: Do not special case cold section.
* config/darwin-protos.h (darwin_function_section): Declare.
* config/microblaze/microblaze.h (HOT_TEXT_SECTION_NAME,
UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Remove.
* config/ia64/hpux.h (HOT_TEXT_SECTION_NAME,
UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Remove.
(TARGET_ASM_FUNCTION_SECTION): Define to ia64_hpux_function_section.
* config/ia64/ia64.c (ia64_hpux_function_section): New function.
* config/darwin.c (machopic_select_section): Use
darwin_function_section.
(darwin_function_section): New function.
* config/darwin.h (HOT_TEXT_SECTION_NAME,
UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Remove.
(TARGET_ASM_FUNCTION_SECTION): Define.
* system.h (HOT_TEXT_SECTION_NAME,
UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Poison.
From-SVN: r167085
Diffstat (limited to 'gcc/predict.c')
-rw-r--r-- | gcc/predict.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/gcc/predict.c b/gcc/predict.c index 5fcfc1e..cb4edcd 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -78,7 +78,6 @@ static sreal real_zero, real_one, real_almost_one, real_br_prob_base, static void combine_predictions_for_insn (rtx, basic_block); static void dump_prediction (FILE *, enum br_predictor, int, basic_block, int); static void predict_paths_leading_to (basic_block, enum br_predictor, enum prediction); -static void choose_function_section (void); static bool can_predict_insn_p (const_rtx); /* Information we hold about each branch predictor. @@ -2185,8 +2184,6 @@ estimate_bb_frequencies (void) free_aux_for_edges (); } compute_function_frequency (); - if (flag_reorder_functions) - choose_function_section (); } /* Decide whether function is hot, cold or unlikely executed. */ @@ -2232,35 +2229,6 @@ compute_function_frequency (void) } } -/* Choose appropriate section for the function. */ -static void -choose_function_section (void) -{ - struct cgraph_node *node = cgraph_node (current_function_decl); - if (DECL_SECTION_NAME (current_function_decl) - || !targetm.have_named_sections - /* Theoretically we can split the gnu.linkonce text section too, - but this requires more work as the frequency needs to match - for all generated objects so we need to merge the frequency - of all instances. For now just never set frequency for these. */ - || DECL_ONE_ONLY (current_function_decl)) - return; - - /* If we are doing the partitioning optimization, let the optimization - choose the correct section into which to put things. */ - - if (flag_reorder_blocks_and_partition) - return; - - if (node->frequency == NODE_FREQUENCY_HOT) - DECL_SECTION_NAME (current_function_decl) = - build_string (strlen (HOT_TEXT_SECTION_NAME), HOT_TEXT_SECTION_NAME); - if (node->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED) - DECL_SECTION_NAME (current_function_decl) = - build_string (strlen (UNLIKELY_EXECUTED_TEXT_SECTION_NAME), - UNLIKELY_EXECUTED_TEXT_SECTION_NAME); -} - static bool gate_estimate_probability (void) { |