This applies overflow heuristics to maybe_hot_frequency_p to make
sure not everything is thought to be cold (which happens when
building polyhedron AIR with -fwhole-program).

Bootstrapped and tested on x86_64-unknown-linux-gnu, approved by
Honza on IRC.

Richard.

2011-07-26  Richard Guenther  <rguent...@suse.de>

        * predict.c (maybe_hot_frequency_p): Make sure a zero entry-block
        frequency makes everything hot.

Index: gcc/predict.c
===================================================================
--- gcc/predict.c       (revision 176789)
+++ gcc/predict.c       (working copy)
@@ -124,7 +124,7 @@ maybe_hot_frequency_p (int freq)
   if (profile_status == PROFILE_ABSENT)
     return true;
   if (node->frequency == NODE_FREQUENCY_EXECUTED_ONCE
-      && freq <= (ENTRY_BLOCK_PTR->frequency * 2 / 3))
+      && freq < (ENTRY_BLOCK_PTR->frequency * 2 / 3))
     return false;
   if (freq < ENTRY_BLOCK_PTR->frequency / PARAM_VALUE 
(HOT_BB_FREQUENCY_FRACTION))
     return false;

Reply via email to