diff options
author | Jan Hubicka <jh@suse.cz> | 2010-04-27 16:56:33 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-04-27 14:56:33 +0000 |
commit | e65bb9be499d2cea82fdfad49d7cf901167f9562 (patch) | |
tree | ba01f849174d822c82ea0fcae6a53e429d1ab377 /gcc/cgraph.c | |
parent | 38e3d8681f2e6773b44afc6beee57630e9b20b8e (diff) | |
download | gcc-e65bb9be499d2cea82fdfad49d7cf901167f9562.zip gcc-e65bb9be499d2cea82fdfad49d7cf901167f9562.tar.gz gcc-e65bb9be499d2cea82fdfad49d7cf901167f9562.tar.bz2 |
invoke.texi (-fipa-profile): Document.
* doc/invoke.texi (-fipa-profile): Document.
* opts.c (decode_options): Enable ipa-profile at -O1.
* timevar.def (TV_IPA_PROFILE): Define.
* common.opt (fipa-profile): Add.
* cgraph.c (cgraph_clone_node): Set local flag and clear vtable method flag
for clones.
(cgraph_propagate_frequency): Handle only local ones.
* tree-pass.h (pass_ipa_profile): Declare.
* ipa-profile.c (gate_profile): Use flag_ipa_profile.
(pass_ipa_profile): Use TV_IPA_PROFILE.
* ipa.c (ipa_profile): New function.
(gate_ipa_profile): Likewise.
(pass_ipa_profile): New global variable.
* passes.c (pass_ipa_profile): New.
From-SVN: r158788
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 95f4411..781d3b0 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -1897,6 +1897,8 @@ cgraph_clone_node (struct cgraph_node *n, gcov_type count, int freq, new_node->analyzed = n->analyzed; new_node->local = n->local; new_node->local.externally_visible = false; + new_node->local.local = true; + new_node->local.vtable_method = false; new_node->global = n->global; new_node->rtl = n->rtl; new_node->count = count; @@ -2314,7 +2316,7 @@ cgraph_propagate_frequency (struct cgraph_node *node) { bool maybe_unlikely_executed = true, maybe_executed_once = true; struct cgraph_edge *edge; - if (node->needed || node->local.externally_visible) + if (!node->local.local) return false; gcc_assert (node->analyzed); if (node->frequency == NODE_FREQUENCY_HOT) |