[PATCH] D27790: Pass sample pgo flags to thinlto.
Dehao Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 14 19:25:01 PST 2016
danielcdh added a comment.
In https://reviews.llvm.org/D27790#623219, @mehdi_amini wrote:
> 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).
Yes, it's in compile phase, but if the profile changes, the profile summary is very likely to change, which makes it necessary to recompile all functions unless the function has no profile at all. Or am I missing something?
https://reviews.llvm.org/D27790
More information about the llvm-commits
mailing list