[cfe-dev] Clang PGO and LLVM PGO commandline interface

Xinliang David Li via cfe-dev cfe-dev at lists.llvm.org
Wed Dec 27 22:02:29 PST 2017


-fprofile-use and -fprofile-instr-use can actually be used interchangeably
for front-end and IR based PGO.  The difference is that -fprofile-use=<>
also takes a directory as the argument.


David

On Wed, Dec 27, 2017 at 7:46 PM, Pirama Arumuga Nainar via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> https://clang.llvm.org/docs/UsersManual.html#profile-guided-optimization
> is the documentation for Clang's PGO.  It doesn't explicitly state which
> flags map to frontend and IR-based instrumentation.
>
> * -fprofile-generate and -fprofile-use are for IR-based instrumentation
> and profile use.
> * -fprofile-instr-generate and -fprofile-instr-use are for frontend-based
> instrumentation and profile use.
> * -fprofile-sample-use is to use sparse profiles from
> hardware-counter-based profiles.
>
>
>
> On Wed, Dec 27, 2017 at 2:37 PM, Johan Engelen via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
>> Hello all,
>>   A while ago, I implemented frontend-based PGO in LDC (very similar to
>> Clang's) and now I'd like to add IR-based PGO. I want the commandline
>> interface to be the same (or very similar) to Clang's, but I am having
>> trouble finding the current state of Clang's PGO commandline flags (and
>> their meaning related to Clang/LLVM-IR PGO).
>>
>> Can you give me a pointer to where I can find this, or perhaps give me a
>> brief overview of the current flags and how to select whether to use
>> frontend-based or IR-based PGO ?
>>
>> Thanks a lot,
>>   Johan
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
>>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20171227/094e11ac/attachment.html>


More information about the cfe-dev mailing list