+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
/* 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
{
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