Commit 39e87baf by Martin Jambor Committed by Martin Jambor

ipa-cp.c (propagate_constants_topo): Do not ignore SCC represented by a thunk.

2013-09-10  Martin Jambor  <mjambor@suse.cz>

	* ipa-cp.c (propagate_constants_topo): Do not ignore SCC
	represented by a thunk.

From-SVN: r202444
parent 669ea36c
2013-09-10 Martin Jambor <mjambor@suse.cz>
* ipa-cp.c (propagate_constants_topo): Do not ignore SCC
represented by a thunk.
2013-09-10 Jeff Law <law@redhat.com> 2013-09-10 Jeff Law <law@redhat.com>
PR tree-optimization/58343 PR tree-optimization/58343
......
...@@ -2113,23 +2113,17 @@ propagate_constants_topo (struct topo_info *topo) ...@@ -2113,23 +2113,17 @@ propagate_constants_topo (struct topo_info *topo)
for (i = topo->nnodes - 1; i >= 0; i--) for (i = topo->nnodes - 1; i >= 0; i--)
{ {
unsigned j;
struct cgraph_node *v, *node = topo->order[i]; struct cgraph_node *v, *node = topo->order[i];
struct ipa_dfs_info *node_dfs_info; vec<cgraph_node_ptr> cycle_nodes = ipa_get_nodes_in_cycle (node);
if (!cgraph_function_with_gimple_body_p (node))
continue;
node_dfs_info = (struct ipa_dfs_info *) node->symbol.aux;
/* First, iteratively propagate within the strongly connected component /* First, iteratively propagate within the strongly connected component
until all lattices stabilize. */ until all lattices stabilize. */
v = node_dfs_info->next_cycle; FOR_EACH_VEC_ELT (cycle_nodes, j, v)
while (v) if (cgraph_function_with_gimple_body_p (v))
{
push_node_to_stack (topo, v); push_node_to_stack (topo, v);
v = ((struct ipa_dfs_info *) v->symbol.aux)->next_cycle;
}
v = node; v = pop_node_from_stack (topo);
while (v) while (v)
{ {
struct cgraph_edge *cs; struct cgraph_edge *cs;
...@@ -2144,19 +2138,18 @@ propagate_constants_topo (struct topo_info *topo) ...@@ -2144,19 +2138,18 @@ propagate_constants_topo (struct topo_info *topo)
/* Afterwards, propagate along edges leading out of the SCC, calculates /* Afterwards, propagate along edges leading out of the SCC, calculates
the local effects of the discovered constants and all valid values to the local effects of the discovered constants and all valid values to
their topological sort. */ their topological sort. */
v = node; FOR_EACH_VEC_ELT (cycle_nodes, j, v)
while (v) if (cgraph_function_with_gimple_body_p (v))
{ {
struct cgraph_edge *cs; struct cgraph_edge *cs;
estimate_local_effects (v);
add_all_node_vals_to_toposort (v);
for (cs = v->callees; cs; cs = cs->next_callee)
if (!edge_within_scc (cs))
propagate_constants_accross_call (cs);
v = ((struct ipa_dfs_info *) v->symbol.aux)->next_cycle; estimate_local_effects (v);
} add_all_node_vals_to_toposort (v);
for (cs = v->callees; cs; cs = cs->next_callee)
if (!edge_within_scc (cs))
propagate_constants_accross_call (cs);
}
cycle_nodes.release ();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment