Commit f8754107 by Jan Hubicka Committed by Jan Hubicka

cgraph.c (cgraph_update_edges_for_call_stmt_node): Do not access removed node.


	* cgraph.c (cgraph_update_edges_for_call_stmt_node): Do not access
	removed node.
	* cgraphunit.c (verify_cgraph_node): Verify frequencies for match.

From-SVN: r154242
parent aaf5d6c0
2009-11-17 Jan Hubicka <jh@suse.cz>
* cgraph.c (cgraph_update_edges_for_call_stmt_node): Do not access
removed node.
* cgraphunit.c (verify_cgraph_node): Verify frequencies for match.
2009-11-17 Uros Bizjak <ubizjak@gmail.com>
* config/i386/predicates.md (x86_64_szext_general_operand): Do not
......@@ -1000,10 +1000,10 @@ cgraph_update_edges_for_call_stmt_node (struct cgraph_node *node,
/* Otherwise remove edge and create new one; we can't simply redirect
since function has changed, so inline plan and other information
attached to edge is invalid. */
cgraph_remove_edge (e);
count = e->count;
frequency = e->frequency;
loop_nest = e->loop_nest;
cgraph_remove_edge (e);
}
else
{
......
......@@ -620,6 +620,18 @@ verify_cgraph_node (struct cgraph_node *node)
error ("caller edge frequency is too large");
error_found = true;
}
if (gimple_has_body_p (e->caller->decl)
&& !e->caller->global.inlined_to
&& (e->frequency
!= compute_call_stmt_bb_frequency (e->caller->decl,
gimple_bb (e->call_stmt))))
{
error ("caller edge frequency %i does not match BB freqency %i",
e->frequency,
compute_call_stmt_bb_frequency (e->caller->decl,
gimple_bb (e->call_stmt)));
error_found = true;
}
if (!e->inline_failed)
{
if (node->global.inlined_to
......
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