This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Suppress -fopt-info message for non-unrolled loops
- From: tejohnson at google dot com (Teresa Johnson)
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 15 May 2013 07:50:32 -0700
- Subject: [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;