aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2012-10-25 19:23:15 +0000
committerJan Hubicka <jh@suse.cz>2012-10-25 19:23:15 +0000
commitaf6b99e18866bf9cee5f75510d211684a9135543 (patch)
tree81e2371d565ef985b588b64d19e5b6de88ca0df3 /gcc/ipa-cp.c
parent9064a42115c80c1c4bc48cb55b16fe4f410e1b07 (diff)
* ipa-cp.c (ipcp_discover_new_direct_edges): If something was turned
to direct call update the summary. * ipa-inline-transform.c (inline_call): Sanity check that summaries match the predicted effect; fix updating of summary after edge redirection. * ipa-inline-analysis.c (inline_node_duplication_hook): Do not try to update the summary and recompute it instead. (estimate_function_body_sizes): Fix self size estimation; double check that it agrees with inline_update_overall_summary. (estimate_edge_size_and_time): Handle devirtualizaiton costs. (estimate_edge_devirt_benefit): Update to be called from estimate_edge_size_and_time. (estimate_calls_size_and_time): Update. (estimate_node_size_and_time): Watch overflows. (inline_merge_summary): Likewise. * ipa-prob.c: Include ipa-inline.h (ipa_make_edge_direct_to_target): After redirection update the summary. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@192821 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index ef9569e8009..8f8053fa480 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -1688,6 +1688,7 @@ ipcp_discover_new_direct_edges (struct cgraph_node *node,
VEC (tree, heap) *known_vals)
{
struct cgraph_edge *ie, *next_ie;
+ bool found = false;
for (ie = node->indirect_calls; ie; ie = next_ie)
{
@@ -1696,8 +1697,14 @@ ipcp_discover_new_direct_edges (struct cgraph_node *node,
next_ie = ie->next_callee;
target = ipa_get_indirect_edge_target (ie, known_vals, NULL, NULL);
if (target)
- ipa_make_edge_direct_to_target (ie, target);
+ {
+ ipa_make_edge_direct_to_target (ie, target);
+ found = true;
+ }
}
+ /* Turning calls to direct calls will improve overall summary. */
+ if (found)
+ inline_update_overall_summary (node);
}
/* Vector of pointers which for linked lists of clones of an original crgaph