diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-20 11:46:08 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-20 11:46:08 +0000 |
commit | 60ac8a3c08cc653bc92507cb1be08ca2ebe6774a (patch) | |
tree | f3fe8a05128f6bc4356c7cbf0d913d6c48f65c90 /gcc/ipa-inline.c | |
parent | f454a5ff5cda04dec979d1d291c0b1089bbb22ad (diff) | |
download | gcc-60ac8a3c08cc653bc92507cb1be08ca2ebe6774a.tar.gz |
PR bootstrap/50709
* ipa-inline.c (inline_small_functions): Fix checking code to not make
effect on fibheap stability.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180247 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r-- | gcc/ipa-inline.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index f069914cf64..909b5ba29f3 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -1384,6 +1384,7 @@ inline_small_functions (void) struct cgraph_node *where, *callee; int badness = fibheap_min_key (heap); int current_badness; + int cached_badness; int growth; edge = (struct cgraph_edge *) fibheap_extract_min (heap); @@ -1392,16 +1393,18 @@ inline_small_functions (void) if (!edge->inline_failed) continue; - /* Be sure that caches are maintained consistent. */ -#ifdef ENABLE_CHECKING + /* Be sure that caches are maintained consistent. + We can not make this ENABLE_CHECKING only because it cause differnt + updates of the fibheap queue. */ + cached_badness = edge_badness (edge, false); reset_edge_growth_cache (edge); reset_node_growth_cache (edge->callee); -#endif /* When updating the edge costs, we only decrease badness in the keys. Increases of badness are handled lazilly; when we see key with out of date value on it, we re-insert it now. */ current_badness = edge_badness (edge, false); + gcc_assert (cached_badness == current_badness); gcc_assert (current_badness >= badness); if (current_badness != badness) { |