[PATCH] D29512: [PGO] Directory name stripping in global identifier for static functions

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 16:51:40 PST 2017


ThinLTO is fact coupled with PGO naming scheme as of now. It needs to have
the same naming scheme to import the right indirect-call function.

We can move this options to InstrProf.cpp, but this will break the
indirect-call-promotion in thin-lto mode.
I'm not sure if I understand the reconstruction method. How can this
reconstruction affect the importing in thin-lto?



On Fri, Feb 3, 2017 at 4:16 PM, Xinliang David Li <davidxl at google.com>
wrote:

>
>
> On Fri, Feb 3, 2017 at 4:00 PM, Teresa Johnson via Phabricator <
> reviews at reviews.llvm.org> wrote:
>
>> tejohnson added inline comments.
>>
>>
>> ================
>> Comment at: lib/IR/Globals.cpp:159
>> +    else {
>> +      if (StaticFuncStripDirNamePrefix != 0)
>> +        FileName = stripDirPrefix(FileName,
>> StaticFuncStripDirNamePrefix);
>> ----------------
>> davidxl wrote:
>> > getGlobalIdentifier is a low level interface. Move this into
>> getPGOFuncName
>> Rong and I discussed this - putting it here ensures the same naming
>> scheme is used for PGO and for the ThinLTO index. Although for ThinLTO we
>> will likely not want this enabled. I'm not sure if there is a good way to
>> enforce that.
>>
>>
> Ideally we should not couple ThinLTO naming scheme with PGO lookup name
> scheme -- PGO code should be able to 'reconstruct' the original static
> function name and then use getPGOFuncName to form the lookup name -- but
> that is for later.
>
> For now, it is better to isolate this internal option to the domain of PGO
> only.
>
> David
>
>
>
>>
>> https://reviews.llvm.org/D29512
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170203/cf72d591/attachment.html>


More information about the llvm-commits mailing list