diff options
author | Jan Hubicka <jh@suse.cz> | 2009-11-17 10:35:51 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2009-11-17 09:35:51 +0000 |
commit | f875410705747d41663d99d930469fd295a47a4b (patch) | |
tree | 5c2d2e6d83ad71202162d80457067c8abba0eec2 /gcc/cgraphunit.c | |
parent | aaf5d6c03bfda69eb7327584815380af73029da8 (diff) | |
download | gcc-f875410705747d41663d99d930469fd295a47a4b.zip gcc-f875410705747d41663d99d930469fd295a47a4b.tar.gz gcc-f875410705747d41663d99d930469fd295a47a4b.tar.bz2 |
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
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 1c13f95..2c232a5 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -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 |