* predict.c (maybe_hot_edge_p): Calls to functions called once is cold.
authorJan Hubicka <jh@suse.cz>
Sun, 30 May 2010 23:36:18 +0000 (01:36 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 30 May 2010 23:36:18 +0000 (23:36 +0000)
From-SVN: r160061

gcc/ChangeLog
gcc/predict.c

index 986aacee4e61b2da7ff74dd1f10b7a59913da020..f21ba34e4f62d96bfc307f3d1aad430431c79454 100644 (file)
@@ -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
index 29e0e2fcd99720f08018827442d1c5d151e7f8d3..1bccd4d2c26b9b347060d488b0ffd982cfb6b763 100644 (file)
@@ -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)