[llvm] [BOLT] Impute missing trace fall-through (PR #145258)
Amir Ayupov via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 11 13:23:04 PDT 2025
aaupov wrote:
> Nice results. How does that approach compare to dropping a trace corresponding to the TOS entry, and only using the TOS branch source for establishing the fall-though end for a previous trace?
Dropping a TOS branch entry while the keeping TOS branch source for previous trace fall-through end is a very good alternative. We lose about 0.1-0.6% profiled functions doing so, but profile quality metrics are very similar across the board, with CFG imbalance slightly favoring dropping TOS entry and CG imbalance favoring imputing TOS fall-through. Couple of data points:
Dropping TOS trace -> imputing TOS fall-through
Ads 1 (br_inst_retired.near_taken:uppp event here and below)
- Profiled functions 46423 -> 46631
- CFG imbalance 2.97% -> 3.01%
- CG imbalance 9.28% -> 8.06%
Ads 2
- Profiled functions 56763 -> 56980
- CFG imbalance 2.86% -> 3.26%
- CG imbalance 11.87% -> 10.58%
uwsgi
- Profiled functions 95694 -> 96115
- CFG imbalance 3.98% -> 4.43%
- CG imbalance 100.00% -> 100.00%
search
- Profiled functions 17019 -> 17120
- CFG imbalance 3.36% -> 3.58%
- CG imbalance 49.44% -> 48.59%
Keeping TOS branch only -> imputing TOS fall-through
web (cycles:u event)
- Profiled functions: 31306 =
- CG imbalance: 36.63% -> 31.16%
- CFG imbalance: 7.27% -> 7.04%
https://github.com/llvm/llvm-project/pull/145258
More information about the llvm-commits
mailing list