Patchwork Make vectorizer dumps more comparable

login
register
mail settings
Submitter Richard Guenther
Date Aug. 24, 2011, 11:20 a.m.
Message ID <alpine.LNX.2.00.1108241317570.2130@zhemvz.fhfr.qr>
Download mbox | patch
Permalink /patch/111315/
State New
Headers show

Comments

Richard Guenther - Aug. 24, 2011, 11:20 a.m.
This avoids the file/location clutter in front of each line
in the vectorizer dump.  While this is useful for people
requesting -fvectorizer-verbose=N in dump files this makes
you unable to compare dumps for testcases on a branch and trunk.
It also makes lines excessively long because the testsuite
filename paths are so long.  Very annoying.

(I'd argue also that -fvectorizer-verbose=N dumps to the dump
file if available and not always to stderr is bogus, but well ...)

This patch has made my life a lot easier debugging the data dependence 
stuff.

Bootstrapped and tested on x86_64-unknown-linux-gnu, installed on trunk.

Richard.

2011-08-24  Richard Guenther  <rguenther@suse.de>

	* tree-vectorizer.c (vect_print_dump_info): Avoid the
	file and location clutter when dumping to dump files.
Michael Matz - Aug. 24, 2011, 1:52 p.m.
Hi,

On Wed, 24 Aug 2011, Richard Guenther wrote:

> This avoids the file/location clutter in front of each line in the 
> vectorizer dump.  While this is useful for people requesting 
> -fvectorizer-verbose=N in dump files this makes you unable to compare 
> dumps for testcases on a branch and trunk. It also makes lines 
> excessively long because the testsuite filename paths are so long.  
> Very annoying.

While the repetition is indeed annoying I put the location marker to good 
use for files with multiple loops.  Just searching for "123:" jumped you 
to the dump block where the interesting loop started to be analyzed.  Same 
for searching from the end, where it put you right at the final decision.

I would very much prefer if that would still be possible, possibly by 
using "start to analyze loop at file:123" and "finished with loop at 
file:123".


Ciao,
Michael.
Richard Guenther - Aug. 24, 2011, 2:10 p.m.
On Wed, 24 Aug 2011, Michael Matz wrote:

> Hi,
> 
> On Wed, 24 Aug 2011, Richard Guenther wrote:
> 
> > This avoids the file/location clutter in front of each line in the 
> > vectorizer dump.  While this is useful for people requesting 
> > -fvectorizer-verbose=N in dump files this makes you unable to compare 
> > dumps for testcases on a branch and trunk. It also makes lines 
> > excessively long because the testsuite filename paths are so long.  
> > Very annoying.
> 
> While the repetition is indeed annoying I put the location marker to good 
> use for files with multiple loops.  Just searching for "123:" jumped you 
> to the dump block where the interesting loop started to be analyzed.  Same 
> for searching from the end, where it put you right at the final decision.
> 
> I would very much prefer if that would still be possible, possibly by 
> using "start to analyze loop at file:123" and "finished with loop at 
> file:123".

Yes, that would be nice.  Patches welcome ;)

Richard.

Patch

Index: gcc/tree-vectorizer.c
===================================================================
--- gcc/tree-vectorizer.c	(revision 178028)
+++ gcc/tree-vectorizer.c	(working copy)
@@ -149,7 +149,10 @@  vect_print_dump_info (enum vect_verbosit
   if (!current_function_decl || !vect_dump)
     return false;
 
-  if (vect_location == UNKNOWN_LOC)
+  if (dump_file)
+    fprintf (vect_dump, "\n");
+
+  else if (vect_location == UNKNOWN_LOC)
     fprintf (vect_dump, "\n%s:%d: note: ",
 	     DECL_SOURCE_FILE (current_function_decl),
 	     DECL_SOURCE_LINE (current_function_decl));