[PATCH] D27790: Pass sample pgo flags to thinlto.
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 14 19:16:17 PST 2016
mehdi_amini added a comment.
In https://reviews.llvm.org/D27790#623209, @danielcdh wrote:
> Considering sample pgo profile as a weighted-forest of inline stacks, each root corresponds to a symbol in the profile binary. The job of profile preparation is to expand the IR to resemble the hot part of the forest as in profile. More details about the sample pgo can be found in http://dl.acm.org/citation.cfm?id=2854044
> At ThinLTO compile step, not all nodes is expandable as they could come from other modules. That's why we need to have SampleProfileLoader invoked after all nodes are visible.
I have to read the citation to understand :)
> In Sample PGO, the change of profile is far less frequent than source code. But once the profile is changed, the incremental build will be broken: everything needs to be built from scratch. I guess the same applies to instrumentation based pgo?
I don't think so: for instrumentation based PGO is applied during the compile phase (there is certainly a key difference that does not make it possible with the sample based one).
More information about the llvm-commits