[llvm] [SCEV] Refactor forgetLoop and forgetValue to improve compile time (PR #198759)

Mingjie Xu via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 4 06:04:29 PDT 2026


Enna1 wrote:

Thanks for your review!

Split into two PRs:
- `forgetLoop`: https://github.com/llvm/llvm-project/pull/201572

- `forgetValue`: https://github.com/llvm/llvm-project/pull/201573

Addressed the correctness issue in the forgetValue PR. After the fix, the change shows no measurable improvement on the compile-time tracker — I'm not sure this PR is still worth.
https://llvm-compile-time-tracker.com/compare.php?from=8557b5714bca181906118a86d8152598f525fcc7&to=21a5664f792522ad9944f76a75cc977ecb8eafb8&stat=instructions%3Au

For context: the following flamegraph is taken from one of our internal cases where forgetValue and forgetLoop are the main hotspots:
<img width="1200" height="1318" alt="gperftools flamegraph 1" src="https://github.com/user-attachments/assets/ddfacd99-b717-40e8-b48c-a0a57885557e" />


https://github.com/llvm/llvm-project/pull/198759


More information about the llvm-commits mailing list