aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-05-31 01:36:18 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2010-05-30 23:36:18 +0000
commit22983f55de9d34ab73af4d2a257f65b7f2f0db4d (patch)
tree0b353e7a5e8cd7bf333fc7aa32c2cfe0004892d9 /gcc
parent7a08eda1619ac02b31ff4bcf8582a94237424132 (diff)
downloadgcc-22983f55de9d34ab73af4d2a257f65b7f2f0db4d.zip
gcc-22983f55de9d34ab73af4d2a257f65b7f2f0db4d.tar.gz
gcc-22983f55de9d34ab73af4d2a257f65b7f2f0db4d.tar.bz2
* predict.c (maybe_hot_edge_p): Calls to functions called once is cold.
From-SVN: r160061
Diffstat (limited to 'gcc')
-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)