This is a follow up diff for BinarySizeContextTracker to track zero size for fully optimized inlinee. When an inlinee is fully optimized away, we won't be able to get its size through symbolizing instructions, hence we will treat the corresponding context size as unknown. However by traversing the inlined probe forest, we know what're original inlinees regardless of optimization. If a context show up in inlined probes, but not during symbolization, we know that it's fully optimized away hence its size is zero instead of unknown. It should provide more accurate size cost estimation for pre-inliner to make better inline decisions in llvm-profgen.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/Transforms/IPO/SampleContextTracker.h | ||
---|---|---|
84 | Use Optional for this field? |
llvm/include/llvm/Transforms/IPO/SampleContextTracker.h | ||
---|---|---|
84 | Sounds good, changed. |
Comment Actions
LGTM.
llvm/tools/llvm-profgen/ProfiledBinary.h | ||
---|---|---|
123 | trackOptimizedInlinees --> trackInlineesOptimizedAway? |
llvm/tools/llvm-profgen/ProfiledBinary.h | ||
---|---|---|
123 | Sounds good, renamed. |
Use Optional for this field?