[cfe-dev] Status of IR vs. frontend PGO (fprofile-generate vs fprofile-instr-generate)

Alex Lorenz via cfe-dev cfe-dev at lists.llvm.org
Tue Jun 15 16:26:10 PDT 2021



> On Jun 14, 2021, at 11:25 AM, Reid Kleckner <rnk at google.com> wrote:
> 
> Sure, there's no rush to deprecate frontend PGO. In the meantime, would it be OK to update the open source docs to recommend IR PGO over frontend PGO, without making any statement about deprecation? This is mainly to get any new PGO users onto what we think is currently the most well-lit path.

I think that’s fine, no objections from us.

> 
> On Mon, Jun 14, 2021 at 10:31 AM Alex Lorenz <aleksei_lorenz at apple.com <mailto:aleksei_lorenz at apple.com>> wrote:
> Bumping up this thread. Based on the initial investigation, I think we can switch to the IR PGO instead of the frontend PGO and so you’ll be able to proceed with this deprecation of the frontend PGO. We would like to request some additional time to do a full investigation and prepare for the transition on our end though, ideally we would need about 3 - 6 months to ensure we are prepared for that. Would you be willing to revisit this again in the future once we’re ready for that?
> 
> Thanks,
> Alex
> 
>> On May 20, 2021, at 9:54 AM, Xinliang David Li <xinliangli at gmail.com <mailto:xinliangli at gmail.com>> wrote:
>> 
>> 
>> 
>> On Thu, May 20, 2021 at 9:47 AM Reid Kleckner <rnk at google.com <mailto:rnk at google.com>> wrote:
>> On Wed, May 19, 2021 at 7:48 PM Alex Lorenz <aleksei_lorenz at apple.com <mailto:aleksei_lorenz at apple.com>> wrote:
>> As far the possible deprecation of frontend PGO, will that imply that the `-fprofile-instr-generate / use` options will get removed, or will they still be supported but will leverage IR PGO instead?
>> 
>> That makes sense to me, but we need to untangle the fact that `-fprofile-instr-generate -fcoverage-mapping` is currently used for coverage, so a simple alias isn't quite correct.
>> 
>> I've always wanted a single, high-level coverage flag, and I always thought it should be spelled --coverage of -fcoverage, but that seems like it's already taken by gcov instrumentation. =/ I guess we need to bikeshed a new spelling.
>> 
>> Right.   -fcoverage-mapping itself does not much so it should probably imply frontend instrumentation. 
>> 
>> For migration purposes, if -fcoverage-mapping is used together with -fprofile-instr-generate (which becomes IR PGO), the latter will be dropped (or a warning is given). The tricky part is if the user uses the option to specify the profile path, then we have a problem.
>> 
>> David
>> 
>> David
>>  
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210615/ca90906b/attachment.html>


More information about the cfe-dev mailing list