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] PR18441: vectorizer dump reports improvement






> This is broken.  If dump_file is NULL and vect_verbosity_level is
> MAX_VERBOSITY_LEVEL (no -ftree-vectorizer-verbose) but
> -fdump-tree-ifcvt-stats is passed then you try to fprintf into a NULL
> stream.  This is causing regressions for gcc.dg/tree-ssa/ifc-20040816-1.c
> and gcc.dg/tree-ssa/ifc-20040816-2.c (compare
> http://gcc.gnu.org/ml/gcc-testresults/2005-02/msg00237.html with
> http://gcc.gnu.org/ml/gcc-testresults/2005-02/msg00211.html).

Does the attached patch help? (I don't see these failures on
powerpc-darwin, so would appreciate if you could test if the patch fixes
the problem).

Bootstrapped on powerpc-darwin,

dorit

      * tree-vectorizer.c (vect_set_dump_settings): Check that dump_file
exists.

(See attached file: feb9)

Andreas Schwab <schwab@suse.de> wrote on 08/02/2005 23:18:08:

> Leehod Baruch <LEEHOD@il.ibm.com> writes:
>
> > + static void
> > + vect_set_dump_settings (void)
> > + {
> > +   vect_dump = dump_file;
> > +
> > +   /* Check if the verbosity level was defined by the user:  */
> > +   if (vect_verbosity_level != MAX_VERBOSITY_LEVEL)
> > +     {
> > +       /* If there is no dump file, print to stderr.  */
> > +       if (!dump_file)
> > +         vect_dump = stderr;
> > +       return;
> > +     }
> > +
> > +   /* User didn't specify verbosity level:  */
> > +   if (dump_flags & TDF_DETAILS)
> > +     vect_verbosity_level = REPORT_DETAILS;
> > +   else if (dump_flags & TDF_STATS)
> > +     vect_verbosity_level = REPORT_UNVECTORIZED_LOOPS;
> > +   else
> > +     vect_verbosity_level = REPORT_NONE;
> > + }
> > +
> > +
> > + /* Function debug_loop_details.
> > +
> > +    For vectorization debug dumps.  */
> > +
> > + static bool
> > + vect_print_dump_info (enum verbosity_levels vl, LOC loc)
> > + {
> > +   if (vl > vect_verbosity_level)
> > +     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;
> > + }
>
> This is broken.  If dump_file is NULL and vect_verbosity_level is
> MAX_VERBOSITY_LEVEL (no -ftree-vectorizer-verbose) but
> -fdump-tree-ifcvt-stats is passed then you try to fprintf into a NULL
> stream.  This is causing regressions for gcc.dg/tree-ssa/ifc-20040816-1.c
> and gcc.dg/tree-ssa/ifc-20040816-2.c (compare
> http://gcc.gnu.org/ml/gcc-testresults/2005-02/msg00237.html with
> http://gcc.gnu.org/ml/gcc-testresults/2005-02/msg00211.html).
>
> Andreas.
>
> --
> Andreas Schwab, SuSE Labs, schwab@suse.de
> SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
> Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
> "And now for something completely different."

Attachment: feb9
Description: Binary data


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