[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:52:34 PST 2016

danielcdh added a comment.

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.

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?


More information about the llvm-commits mailing list