[PATCH] D27790: Pass sample pgo flags to thinlto.

Dehao Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 18:33:57 PST 2016

danielcdh added a comment.

In https://reviews.llvm.org/D27790#623195, @mehdi_amini wrote:

> In https://reviews.llvm.org/D27790#623176, @pcc wrote:
> > Do we need to add the sample profile to the hash in computeCacheKey?

I was planning to have it in a separate patch as it needs to hash the profile content too. Let me know if you think it should be part of this patch.

> I'm concerned about this indeed.
> Why is this SampleProfileLoaderPass not performed during the compile phase?

It is invoked in compiler phase. But if the profile is collected from ThinLTO binary, i.e. there is cross-module inlines in the profiling binary (thus in profile), the profile annotation needs to happen after all these inlines happened. i.e. annotation needs to be invoked once again in the linking phase.



More information about the llvm-commits mailing list