[PATCH] D17006: Refactor PGO function naming and MD5 hashing support out of ProfileData

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 21:04:53 PST 2016


On Mon, Feb 8, 2016 at 9:01 PM, Teresa Johnson <tejohnson at google.com> wrote:
> tejohnson added a comment.
>
> In http://reviews.llvm.org/D17006#347035, @davidxl wrote:
>
>> This one LGTM. I am also expecting another interface like  'getFunctionGuid' to wrap around the MD5Hash method..
>
>
> Do you mean to basically do MD5Hash(getGlobalIdentifier(...))?

I think two interfaces are needed -- one takes Function*, while the
other takes StringRef. The later is for cases where Global string id
already known.

>I could add that with the follow-on patch to use this in the ThinLTO function map.

Ok -- It can be done a in separate patch. After that I will update PGO
to use them.

>Although for now in the draft patch I am testing they are invoked in slightly different places (the MD5Hash is hidden within the FunctionInfoIndex methods which take a string, and getGlobalIdentifier is invoked as needed above that. And for PGO, it didn't look like MD5Hash and getPGOFuncName were invoked simultaneously.

In most cases for PGO, the stringRef based interface will be used.

thanks,

David

>
>
> http://reviews.llvm.org/D17006
>
>
>


More information about the llvm-commits mailing list