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

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 16:16:29 PST 2017


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/3b79d325/attachment.html>


More information about the llvm-commits mailing list