Add -fauto-profile option to Clang driver

Diego Novillo dnovillo at google.com
Mon Oct 28 07:23:56 PDT 2013


On Wed, Oct 23, 2013 at 9:37 AM, Diego Novillo <dnovillo at google.com> wrote:
>
> On Tue, Oct 22, 2013 at 6:25 PM, Chandler Carruth <chandlerc at google.com> wrote:
>
> > - I would personally prefer the intent to be explicit. The more I think
> > about it the less I like one flag activating N different kinds of PGO based
> > on the file type. It makes it too easy to typo a filename and get different
> > (unexpected) behavior.
>
> OK, so you'd prefer a family of flags then?  -fprofile-<kind>-use=...
>
> This would imply a slight asymmetry in flag names with the
> instrumentation based profiles, unless we renamed -fprofile-generate
> to something like -fprofile-instr-generate. But I don't think we need
> to be that fussy.
>
> > - I dislike having flag A which changes flag B's behavior where possible to
> > avoid. It makes it much harder to manipulate things through append-based
> > build systems' flag management.
>
> My inclination was to simply use -fprofile-generate and -fprofile-use.
> The -fprofile-use flag would have file type auto-detection. I agree
> that we could have scenarios where -fprofile-use surprises with
> unexpected behaviour. In which case, -fprofile-<kind>-use or
> -fprofile-use=:kind:filename (or some other variant) could be used.
>
>
> Diego.


Ping?  Bob, Chandler, does this sound reasonable to you?  I'm thinking
of changing the current patch to use -fprofile-sample-use=...

This partially keeps the symmetry with -fprofile-generate /
-fprofile-use and avoids the autodetection logic that Chandler
dislikes.


Diego.



More information about the cfe-commits mailing list