diff mbox

Fix profile estimation

Message ID alpine.LNX.2.00.1107261739100.810@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener July 26, 2011, 3:40 p.m. UTC
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  <rguenther@suse.de>

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

Patch

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;