On Thu, 1 Sep 2011, Ira Rosen wrote:

> 
> 
> Richard Guenther <rguent...@suse.de> wrote on 01/09/2011 11:13:29 AM:
> 
> > > > > IMO it's a bad idea. It's now impossible to find anything when
> > > compiling a
> > > > > big file. How about only removing the file name?
> > > >
> > > > How about, as Micha suggested, print the location of the loop
> > > > we currently investigate from vectorize_loops () where we
> > > > call find_loop_location () instead?
> > >
> > > The problem is that a dump of a single loop can be pretty long, and
> "start
> > > to analyze loop..."/"finish to analyze loop..." may be not visible
> enough.
> > > I am OK with adding these printings though (in addition to line
> numbers).
> > >
> > > I understand why you didn't like to see the file location, but what's
> the
> > > problem with the line number?
> >
> > Well, it seems to be different what everybody else does and it's
> > highly redundant for a whole bunch of lines.
> >
> > But, it solves my diff issue and the overly long lines as well.
> >
> > Your patch changes both dump-file and stderr printing though,
> > I did want to preserve stderr printing.
> 
> OK.
> 
> >
> > For the dump-file I'd drop the 'line ' prefix and just print '%d: '.
> 
> OK.
> 
> >
> > Btw, the diagnostic machinery does _not_ print locations
> > for note (""), the location information is supposed to be printed
> > in the heading warning/error.  Thus, a much better format for stderr
> > would be
> >
> > file.c:12: LOOP NOT VECTORIZED
> > note: unsupported stmt '....'
> >
> > as the further notes will be printed with the 'loop location' which
> > is confusing when dumping statements
> 
> We usually print only one line, like
> 
> file.c:12: note: <message> <stmt>
> 
> so I don't really understand this part.

It's a general note.  With -ftree-vectorizer-verbose=5 we dump a lot
of information with the same location (that of the loop header),
but the individual messages refer not only to the overall loop
but to specific statements, etc.

This all is of course an artifact of sharing the dump file code
with the reporting code.

Richard.

> Ira
> 
> >
> > Richard.
> >
> > > Ira
> > >
> > > >
> > > > Richard.
> > > >
> > > > > Index: tree-vectorizer.c
> > > > > ===================================================================
> > > > > --- tree-vectorizer.c   (revision 178374)
> > > > > +++ tree-vectorizer.c   (working copy)
> > > > > @@ -149,16 +149,12 @@ vect_print_dump_info (enum vect_verbosit
> > > > >    if (!current_function_decl || !vect_dump)
> > > > >      return false;
> > > > >
> > > > > -  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),
> > > > > +  if (vect_location == UNKNOWN_LOC)
> > > > > +    fprintf (vect_dump, "\nline %d: ",
> > > > >              DECL_SOURCE_LINE (current_function_decl));
> > > > >    else
> > > > > -    fprintf (vect_dump, "\n%s:%d: note: ",
> > > > > -            LOC_FILE (vect_location), LOC_LINE (vect_location));
> > > > > +    fprintf (vect_dump, "\nline %d: ",
> > > > > +            LOC_LINE (vect_location));
> > > > >
> > > > >    return true;
> > > > >  }
> > > > >
> > > > > Ira
> > > > >
> > > > > >
> > > > > > 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));
> > > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > > Richard Guenther <rguent...@suse.de>
> > > > SUSE / SUSE Labs
> > > > SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
> > > > GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
> > >
> > >
> >
> > --
> > Richard Guenther <rguent...@suse.de>
> > SUSE / SUSE Labs
> > SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
> > GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
> 
> 

-- 
Richard Guenther <rguent...@suse.de>
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

Reply via email to