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: [patch] vectorizer: maintain location information, and ping





Richard Henderson <rth@redhat.com> wrote on 02/02/2005 20:50:01:

> On Wed, Feb 02, 2005 at 08:28:13PM +0200, Dorit Naishlos wrote:
> > option 1: for now, print only to the dump_file, never to stderr. i.e.,
> > leave this patch as is except change 'vect_fix_debug_settings' to never
set
> > 'vect_dump' to stderr and in 'vect_print_debug_info' check if dump_file
is
> > available.
> >
> > option2: mimic inform. i.e., leave this patch as is except change
> > 'vect_print_debug_info' to print the same prefix that inform uses
> > ("file.c:line: note: ") (at least when printing to stderr).
> >
> > would one of the above be ok?
>
> Either would be ok.  Certianly (1) is easier.
>

I implemented option 2.
The change I made relative to the patch we sent before is to always use the
"file:line: note: " format, using the location of the function if we don't
have the location of the loop:

*************** vect_print_dump_info (enum verbosity_lev
*** 1244,1253 ****
      return false;

    if (loc == UNKNOWN_LOC)
!     fprintf (vect_dump, "\n");
    else
!     fprintf (vect_dump, "\nloop at %s:%d: ",
!              LOC_FILE (loc), LOC_LINE (loc));

    return true;
  }
--- 1244,1255 ----
      return false;

    if (loc == UNKNOWN_LOC)
!     fprintf (vect_dump, "\n%s:%d: note: ",
!                DECL_SOURCE_FILE (current_function_decl),
!                DECL_SOURCE_LINE (current_function_decl));
    else
!     fprintf (vect_dump, "\n%s:%d: note: ", LOC_FILE (loc), LOC_LINE
(loc));
!

    return true;
  }


bootstrapped and tested on powerpc-darwin.

ok?

thanks,

dorit


>
> r~


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