Add -fauto-profile option to Clang driver

Bob Wilson bob.wilson at apple.com
Mon Oct 28 09:57:07 PDT 2013


On Oct 28, 2013, at 7:23 AM, Diego Novillo <dnovillo at google.com> wrote:

> 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.

I don't have a strong opinion on this.  Justin, how does this line up with what you were considering for our profiling options?



More information about the cfe-commits mailing list