Add -fauto-profile option to Clang driver

Diego Novillo dnovillo at
Wed Oct 30 11:09:15 PDT 2013

On Mon, Oct 28, 2013 at 2:13 PM, Justin Bogner <mail at> wrote:
> Bob Wilson <bob.wilson at> writes:
>> On Oct 28, 2013, at 7:23 AM, Diego Novillo <dnovillo at> wrote:
>>> 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?
> Using -fprofile-sample-use= seems simplest for now. We'll probably need
> to figure out exactly what to do with -fprofile-use= and
> -fprofile-generate= in the near future, as the current state is actually
> fairly strange:
> - profile-use and profile-use= are ignored
> - profile-generate= isn't accepted
> - profile-generate causes libprofile_rt to be linked in, but does
>   nothing else
> In GCC, -fprofile-generate implies -fprofile-arcs, which we currently
> use to turn on the GCOVProfilerPass, and the =path versions of these
> options take a directory, whereas both Diego's and Bob's profiling
> approaches deal with a file.


I've renamed the flag and moved the patch over to phabricator:


More information about the cfe-commits mailing list