This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
maybe_hot_edge_p tweek
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 31 May 2010 01:24:11 +0200
- Subject: maybe_hot_edge_p tweek
Hi,
this patch prevents calls to noreturn functions to be inlined for speed.
Bootstrapped/regtested x86_64-linux, will commit it shortly.
Honza
* predict.c (maybe_hot_edge_p): Calls to functions called once is cold.
Index: predict.c
===================================================================
--- predict.c (revision 160051)
+++ predict.c (working copy)
@@ -168,6 +168,9 @@
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)