Add GCC-compatible flags -fprofile-generate and -fprofile-use

Justin Bogner mail at justinbogner.com
Thu Jul 9 10:12:43 PDT 2015


Diego Novillo <dnovillo at google.com> writes:
> On Wed, Jul 8, 2015 at 6:10 PM, Justin Bogner <mail at justinbogner.com> wrote:
>
>>> +def fprofile_use_EQ : Joined<["-"], "fprofile-use=">,
>>> +    Group<f_Group>, Flags<[DriverOption]>, MetaVarName<"<pathname>">,
>>> + HelpText<"Use instrumentation data for profile-guided
>>> optimization. If pathname is a directory, it reads from
>>> <pathname>/default.profile. Otherwise, it reads from file
>>> <pathname>.">;
>>
>> This should say "default.profdata" here to match the code.
>
> Done.
>
>> I think we want a single call to getLastArg here, with all four
>> variants. As is, it isn't last wins - it uses -fprofile-instr-generate=,
>> and if there isn't one of those then it uses -fprofile-generate=, etc.
>
> I'm a goof. I was convinced I had done this before sending the patch.
> Now really done using Richard's suggestion.
>
>> Also, how is -fprofile-generate handled right now? It seems to be
>> missing.
>
> It's declared as an alias to -fprofile-instr-generate, so we don't
> even see it in here. Likewise for -fprofile-use.
>
> OK to commit?

LGTM



More information about the cfe-commits mailing list