* predict.c (maybe_hot_frequency_p): Do not use cfun.
authorJan Hubicka <hubicka@gcc.gnu.org>
Sat, 11 Nov 2017 13:04:25 +0000 (13:04 +0000)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 11 Nov 2017 13:04:25 +0000 (13:04 +0000)
From-SVN: r254652

gcc/predict.c

index 07b4bf7c3989521df58802f7023b64f2afc288c9..56003a5db0924e9d4c8e53b5dce36a2e1748e6c2 100644 (file)
@@ -137,12 +137,12 @@ maybe_hot_frequency_p (struct function *fun, int freq)
   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;
 }