This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix maybe_hot_frequency_p


Hi,
while converting maybe_hot_frequency_p to profile_counts I did not notice that
it has its own function argument.  This patch prevents ICE with
-fdump-tree-ipa-all-details-blocks.

Comitted as obvious.

Honza

	* predict.c (maybe_hot_frequency_p): Do not use cfun.
Index: predict.c
===================================================================
--- predict.c	(revision 254648)
+++ predict.c	(working copy)
@@ -137,12 +137,12 @@
   if (profile_status_for_fn (fun) == PROFILE_ABSENT)
     return true;
   if (node->frequency == NODE_FREQUENCY_EXECUTED_ONCE
-      && freq < (ENTRY_BLOCK_PTR_FOR_FN (fun)->count.to_frequency (cfun) * 2 / 3))
+      && freq < (ENTRY_BLOCK_PTR_FOR_FN (fun)->count.to_frequency (fun) * 2 / 3))
     return false;
   if (PARAM_VALUE (HOT_BB_FREQUENCY_FRACTION) == 0)
     return false;
   if (freq * PARAM_VALUE (HOT_BB_FREQUENCY_FRACTION)
-      < ENTRY_BLOCK_PTR_FOR_FN (fun)->count.to_frequency (cfun))
+      < ENTRY_BLOCK_PTR_FOR_FN (fun)->count.to_frequency (fun))
     return false;
   return true;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]