http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44334
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2010.12.19 11:43:48
Ever Confirmed|0 |1
--- Comment #14 from Jan Hubicka <hubicka at gcc dot gnu.org> 2010-12-19
11:43:48 UTC ---
I finally got into some time to test the various solutions. easiest is probably
the following:
Index: predict.c
===================================================================
--- predict.c (revision 168047)
+++ predict.c (working copy)
@@ -126,7 +126,7 @@ maybe_hot_frequency_p (int freq)
if (node->frequency == NODE_FREQUENCY_EXECUTED_ONCE
&& freq <= (ENTRY_BLOCK_PTR->frequency * 2 / 3))
return false;
- if (freq < BB_FREQ_MAX / PARAM_VALUE (HOT_BB_FREQUENCY_FRACTION))
+ if (freq < ENTRY_BLOCK_PTR->frequency / PARAM_VALUE
(HOT_BB_FREQUENCY_FRACTION))
return false;
return true;
}
It makes GCC to decide on cold basic blocks not based on the innermost loop
nest but on the entry block frequency - so many conditoinals or EH renders BB
cold but not the fact it is outside of very many BBs.
Could you try if this solves the problem?