diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2018-01-18 16:57:48 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2018-01-18 15:57:48 +0000 |
commit | 8b2d991b0390c1bae18b0af416b841f360184e22 (patch) | |
tree | f1a5bfbdb2c85fd876a4e72f9deea404e93a5e4e /gcc/cgraph.c | |
parent | 1f0267acfd4cc3d2582b41c7470e81fec9972a83 (diff) | |
download | gcc-8b2d991b0390c1bae18b0af416b841f360184e22.tar.gz |
re PR ipa/83619 (ICE in inliner: caller edge count does not match BB count)
PR ipa/83619
* g++.dg/torture/pr83619.C: New testcase.
* cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
frequencies.
From-SVN: r256850
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 802214dc81c..9a7d54d7cee 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -1327,6 +1327,7 @@ cgraph_edge::redirect_call_stmt_to_callee (void) e->speculative = false; e->caller->set_call_stmt_including_clones (e->call_stmt, new_stmt, false); + e->count = gimple_bb (e->call_stmt)->count; /* Fix edges for BUILT_IN_CHKP_BNDRET calls attached to the processed call stmt. */ @@ -1346,6 +1347,7 @@ cgraph_edge::redirect_call_stmt_to_callee (void) } e2->speculative = false; + e2->count = gimple_bb (e2->call_stmt)->count; ref->speculative = false; ref->stmt = NULL; /* Indirect edges are not both in the call site hash. |