This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add option for dumping to stderr (issue6190057)
- From: Xinliang David Li <davidxl at google dot com>
- To: Sharad Singhai <singhai at google dot com>
- Cc: Richard Guenther <richard dot guenther at gmail dot com>, Gabriel Dos Reis <gdr at integrable-solutions dot net>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Andrew Pinski <pinskia at gmail dot com>
- Date: Tue, 18 Sep 2012 08:43:20 -0700
- Subject: Re: [PATCH] Add option for dumping to stderr (issue6190057)
- References: <20120509064637.22949A2081@nabu.mtv.corp.google.com> <CAAiZkiCAjA9cLMdqQeMgBuftxQ+oSa0m0yxohs33=qOCVBc17w@mail.gmail.com> <CAKxPW65MhmoGHQ0u2_0tsQc=9VfXCN4+afmqBULDKM=LwZqHvg@mail.gmail.com> <CAAkRFZLRb7ShAzoUSP9eQV8qchJxu_n=DrR19n0OLfKK9f-fSw@mail.gmail.com> <CAFiYyc1eo6=XjhAGz8MWKnVDUQKjkU=Kgfu38vRZyLq3XQSxng@mail.gmail.com> <CAAkRFZ+4b81ucyNgPmTFs25wD9Zm-4jcP02W9LWjjB=hQ-TO_A@mail.gmail.com> <CAFiYyc3o8bZjaMv1gZBMQJodSCH9UsWqohZ9Jw3szN+DXFjRgw@mail.gmail.com> <CAAkRFZJ9_yH-A74=aRkX2+zKgegg+SKobqJNu4a0fA7F90hTRg@mail.gmail.com> <CAAkRFZ+YyLKdsT8LSS88rd9-nxVuGrketu+-2C5qPp-98g1_vg@mail.gmail.com> <CAFiYyc0mfhEyPpY_+qv4StNPiatYKcUKz4vxbX=SeWNPCLJEYg@mail.gmail.com> <CAAkRFZJ3BvP3ytzkZgWqSSzkt+Z26n_zMJKEyhM_1KfEi5mCzQ@mail.gmail.com> <CAAiZkiDz5V2Nysn3AA4-GRgw6_eCEM85z6-gZaMLNq9L+B2DbA@mail.gmail.com> <CAAkRFZKhpk-iMppKWSnKX0Q4SLm7-rWrr2D8cWS8iOP4ypMWzw@mail.gmail.com> <CAFiYyc3xm0xYjLAgpzo7q0ovQKJXR4STyoUC=OKLn4XRiTZw6g@mail.gmail.com> <CAKxPW65FKYwpqaB4DnWd+6aS57ZrNoY91rKiX+L-sS2KQ-VFRw@mail.gmail.com> <CAAkRFZLO4rkLnWR067-=+G94F2pnEgX3Z5jXK0mFu545x2EAzA@mail.gmail.com> <CAKxPW65ar+ZdAwYtG5ECnCNYH+Jw+hiyPbXR2_bQ1OoXsr8_Rg@mail.gmail.com> <CAFiYyc37y7Q_z_7vHdZe98s6kKpgTJi4_ehmk=6gVnirV0TFDA@mail.gmail.com> <CAKxPW66yXwtfo_dnpPSudbrTAMOphwdk=KeAR_2U0P1cvKb4Sw@mail.gmail.com> <CAFiYyc3BF-3z3_QdAZxfSe4jupNbb_Ub_nLbjJQ+MisQxGR_CQ@mail.gmail.com> <CAKxPW67rYndb0AuDBpTfij8vB54Txcg4p6Yba693yTpL9=24fg@mail.gmail.com> <CAFiYyc2neYLHce0EUDCBcVKEw4iHAA0rZhEVTWy4+SaiGYPx+A@mail.gmail.com> <CAKxPW67D5EnOvTMJGcntyXG7WwQud2sW0kS3nHenijp6o0JC7g@mail.gmail.com> <CAKxPW67Nn9YSwH_xwFXBM7=y=32s_HpQ4fUAE+E8GoRSsVjxbA@mail.gmail.com> <CAKxPW66cfyabmH-ZbsMtempBCv5zV=embh=WsR18gAVgpDpFMA@mail.gmail.com> <CAAkRFZ+x+Q6E_6DL8w8JyvHZqGVCxiSc8NDRumc9EhUi1vp++Q@mail.gmail.com> <CAKxPW656sVbeVewS6dZL_d7X+02be16JRZ-4mrXkRLzwyuUxkw@mail.gmail.com> <CAFiYyc3AJ1C92QhZHTk83rZPgLSqwk+=qgYDeY9HG-p4UPRrMA@mail.gmail.com> <CAAkRFZJKbNwtA6cJ+sSn5gm1fdX8cr1yoOZz8RFwQd+5aRUQyQ@mail.gmail.com> <CAFiYyc0Q+JdNc3piYNsZvPBkK3GHWbibysn3dRe0=P_Fc6JYVw@mail.gmail.com> <CAAkRFZLQjn_QtG6F7ecyjvgjT1yZUaoihseEDzWR2fHcbJ8fkQ@mail.gmail.com> <CAKxPW65+e7jdfo+OphVb2i7SoUOO2_h64oki+qgRn2a=WtFRtw@mail.gmail.com>
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.
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