[llvm] [CycleInfo] Identify cycles with a single-pass DFS algorithm (PR #210491)
Alexis Engelke via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 18 05:08:30 PDT 2026
https://github.com/aengelke commented:
On AMD Zen 4 O2 sqlite3.bc ThinLTO opt doing 3000 require+invalidate:
| metric | old cycle analysis | new cycle analysis | loop analysis |
| ----------------------- | -----------------------:| ----------------------:| --------------------------:|
| task-clock | 2,240,407,674 | 1,683,232,139 | 2,875,889,979 |
| instructions (IPC) | 19,849,176,987 (3.24) | 15,998,397,258 (3.48) | 23,994,097,273 (3.06) |
| cycles | 6,117,148,244 | 4,595,837,358 | 7,852,244,018 |
| branches | 3,348,478,759 | 2,640,116,182 | 4,826,881,023 |
| branch-misses | 5,525,269 (0.17%) | 4,841,743 (0.18%) | 5,959,352 (0.12%) |
| L1-dcache-loads | 7,993,836,979 | 6,379,706,425 | 9,435,263,155 |
| L1-dcache-load-misses | 442,566,777 (5.54%) | 162,128,324 (2.54%) | 502,466,987 (5.33%) |
The new algorithm performs better in general as well as on some adversarial inputs than the old one. It also performs much better than the loop analysis. Also confirmed the higher IPC, most probably due to much less L1D misses, most probably due to no predecessor access.
https://github.com/llvm/llvm-project/pull/210491
More information about the llvm-commits
mailing list