This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Statically propagate basic blocks which are likely executed 0 times


Hi,
this is patch I comitted.
Thanks!
Honza

	* predict.c (unlikely_executed_stmt_p): Cleanup.
Index: predict.c
===================================================================
--- predict.c	(revision 249057)
+++ predict.c	(working copy)
@@ -780,7 +780,7 @@ unlikely_executed_stmt_p (gimple *stmt)
 {
   if (!is_gimple_call (stmt))
     return false;
-  /* NORETURN attribute enough is not strong enough: exit() may be quite
+  /* NORETURN attribute alone is not strong enough: exit() may be quite
      likely executed once during program run.  */
   if (gimple_call_fntype (stmt)
       && lookup_attribute ("cold",
@@ -797,10 +797,11 @@ unlikely_executed_stmt_p (gimple *stmt)
   cgraph_node *n = cgraph_node::get (decl);
   if (!n)
     return false;
-  enum availability avail;
+
+  availability avail;
   n = n->ultimate_alias_target (&avail);
   if (avail < AVAIL_AVAILABLE)
-    return NULL;
+    return false;
   if (!n->analyzed
       || n->decl == current_function_decl)
     return false;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]