SamplePGO uses branch_weight annotation to represent callsite hotness. When ICP promotes an indirect call to direct call, we need to make sure the direct call is annotated with branch_weight in SamplePGO mode, so that downstream function inliner can use hot callsite heuristic.
Details
Details
Diff Detail
Diff Detail
- Build Status
Buildable 4222 Build 4222: arc lint + arc unit
Event Timeline
Comment Actions
Not familiar with samplePGO. Are the counters always annotated in the call sites (or the sampled BB)?
The call counts cannot be inferred from entry counts and the branch-weight?
If this the way samplePGO works, this looks fine to me.
Comment Actions
Yes, SamplePGO annotate all hot callsites with absolute branch weight to prevent BFI from messing up with inaccurate branch probability.
lib/Transforms/Instrumentation/IndirectCallPromotion.cpp | ||
---|---|---|
526 | document this is needed for sample PGO callsite hotness. |
document this is needed for sample PGO callsite hotness.