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]

[PATCH] Suppress -fopt-info message for non-unrolled loops


This patch suppresses -fopt-info messages for loops that were not
unrolled/peeled, to avoid emitting "Unroll loop 0 times" messages.

Bootstrapped and tested on x86-64-unknown-linux-gnu. Ok for trunk?

2013-05-15  Teresa Johnson  <tejohnson@google.com>

	* loop-unroll.c (report_unroll_peel): Check decision before
        emitting unroll/peel message.

Index: loop-unroll.c
===================================================================
--- loop-unroll.c	(revision 198891)
+++ loop-unroll.c	(working copy)
@@ -212,6 +212,9 @@ report_unroll_peel (struct loop *loop, location_t
   int niters = 0;
   int report_flags = MSG_OPTIMIZED_LOCATIONS | TDF_RTL | TDF_DETAILS;
 
+  if (loop->lpt_decision.decision == LPT_NONE)
+    return;
+
   if (!dump_enabled_p ())
     return;
 


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