diff options
author | Jan Hubicka <jh@suse.cz> | 2010-10-16 18:59:07 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-10-16 16:59:07 +0000 |
commit | 844db5d09eb972e4f9188b77854d76ce345ca9ee (patch) | |
tree | 729e8daec41bc5163de53301f1aa679b1c2fadf7 /gcc/predict.c | |
parent | 6eb6875d7ec398935d3ae76f805e33db0c3773dd (diff) | |
download | gcc-844db5d09eb972e4f9188b77854d76ce345ca9ee.zip gcc-844db5d09eb972e4f9188b77854d76ce345ca9ee.tar.gz gcc-844db5d09eb972e4f9188b77854d76ce345ca9ee.tar.bz2 |
cgraph.c (dump_cgraph_node): Dump same_comdat_group, only_called_at_startup and only_called_at_exit.
* cgraph.c (dump_cgraph_node): Dump same_comdat_group,
only_called_at_startup and only_called_at_exit.
(cgraph_propagate_frequency): Compute only_called_at_startup and
only_called_at_exit.
* cgraph.h (struct cgraph_node): New fileds only_called_at_startup and
only_called_at_exit.
* lto-cgraph.c (lto_output_node, input_overwrite_node): Stream the new
flags.
* predict.c (compute_function_frequency): Initialize the new flags.
From-SVN: r165560
Diffstat (limited to 'gcc/predict.c')
-rw-r--r-- | gcc/predict.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/predict.c b/gcc/predict.c index 1b61ee4..eb91b87 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -2187,6 +2187,11 @@ compute_function_frequency (void) { basic_block bb; struct cgraph_node *node = cgraph_node (current_function_decl); + if (DECL_STATIC_CONSTRUCTOR (current_function_decl) + || MAIN_NAME_P (DECL_NAME (current_function_decl))) + node->only_called_at_startup = true; + if (DECL_STATIC_DESTRUCTOR (current_function_decl)) + node->only_called_at_exit = true; if (!profile_info || !flag_branch_probabilities) { |