aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/predict.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 986aace..f21ba34 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2010-05-30 Jan Hubicka <jh@suse.cz>
+
+ * predict.c (maybe_hot_edge_p): Calls to functions called once is cold.
+
2010-05-30 Richard Guenther <rguenther@suse.de>
PR lto/42975
diff --git a/gcc/predict.c b/gcc/predict.c
index 29e0e2f..1bccd4d 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -168,6 +168,9 @@ cgraph_maybe_hot_edge_p (struct cgraph_edge *edge)
if (edge->caller->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED
|| edge->callee->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED)
return false;
+ if (edge->caller->frequency > NODE_FREQUENCY_UNLIKELY_EXECUTED
+ && edge->callee->frequency <= NODE_FREQUENCY_EXECUTED_ONCE)
+ return false;
if (optimize_size)
return false;
if (edge->caller->frequency == NODE_FREQUENCY_HOT)