summaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-10 00:38:46 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-10 00:38:46 +0000
commit675f18129007fbd8230f84b786c5a4f6d9d0e155 (patch)
treee7b9077f8f868d6c3e6d9f22b17e5ffca21cfd6d /gcc/ipa-cp.c
parentcaa5e7fd6922adeb19ffea66e98e9e8dd1bb1b49 (diff)
downloadgcc-675f18129007fbd8230f84b786c5a4f6d9d0e155.tar.gz
PR ipa/64978
* ipa-cp.c (gather_caller_stats): Skip thunks. (propagate_constants_topo): Skip aliases. * g++.dg/torture/pr64978.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220557 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 0c540eb61c7..440ced4900c 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -560,10 +560,7 @@ gather_caller_stats (struct cgraph_node *node, void *data)
struct cgraph_edge *cs;
for (cs = node->callers; cs; cs = cs->next_caller)
- if (cs->caller->thunk.thunk_p)
- cs->caller->call_for_symbol_thunks_and_aliases (gather_caller_stats,
- stats, false);
- else
+ if (!cs->caller->thunk.thunk_p)
{
stats->count_sum += cs->count;
stats->freq_sum += cs->frequency;
@@ -2643,7 +2640,7 @@ propagate_constants_topo (struct ipa_topo_info *topo)
for (cs = v->callees; cs; cs = cs->next_callee)
if (ipa_edge_within_scc (cs)
&& propagate_constants_accross_call (cs))
- push_node_to_stack (topo, cs->callee);
+ push_node_to_stack (topo, cs->callee->function_symbol ());
v = pop_node_from_stack (topo);
}