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] Add option for dumping to stderr (issue6190057)


On Sep 18, 2012 8:43 AM, "Xinliang David Li" <davidxl@google.com> wrote:
>
> On Tue, Sep 18, 2012 at 1:48 AM, Sharad Singhai <singhai@google.com> wrote:
> > In response to the recent comments, I have updated the patch to do the
> > following:
> >
> > - Remove pass handling from -fopt-info
> > - Support additional flags in regular dumps
> >
> > I have massaged the options so that they have the following (hopefully
> > clearer) behavior:
> >
> > gcc ... -fopt-info ....   ---> dump all optimization info on stderr
> > gcc ... -fopt-info-missed-optimized=file.txt  --> dump info about
> > optimization applied as well as missed opportunities on to file.txt.
> > If no file.txt is provided, then use stderr.
> >
> > I have enhanced regular dump flags, so that values accepted by
> > -fopt-info are also accepted. For example,
> > gcc ... -O2 -ftree-vectorize -fdump-tree-vect-optimized=foo.dump
> >
> > Now foo.dump will include the regular tree-vect dump as well as the
> > output of -fopt-info=optimized. This way developers can get more
> > detailed dumps when needed.
> >
> > I have also changed the meaning of dump option "details" to include
> > optimization details. Thus "-details" flag implies
> > "-missed-optimized-note" in addition to other dumps.
> >
> > The pass level filtering of -fopt-info dumps can be done in a follow
> > up patch. It may even turn out to be unnecessary, because the
> > equivalent effect can be achieved by
> > -ftree-PASS-optimized-missed-note.
> >
>
> Richard's suggestion to map high level 'pass' names to internal passes
> and make it available to -fopt-info filtering for end users as a
> follow up pass will be useful.


Yes, certainly. I plan to do that in a follow up patch. Currently only
vectorization passes use the new dump infrastructure. But as more
passes get converted, it will be nice to have an option for high-level
-fopt-info filtering for end users.

I presume a group of passes would be covered under a single -fopt-info
name, such as loop-optimizations. The exact scheme is yet to be
designed/discussed.

Thanks,
Sharad

>
>
> thanks,
>
> David
>
>
>
> > I have bootstrapped and tested the attached patch on x86_64 and didn't
> > observe any new failures. Okay for trunk?
> >
> > Thanks,
> > Sharad


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