[llvm] [BOLT] Optimize basic block loops to avoid n^2 loop (PR #156243)

Paschalis Mpeis via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 8 03:51:14 PDT 2025


https://github.com/paschalis-mpeis commented:

Hey Mark,

Thanks for rebasing. I can now verify that tests complete.

There are a few more users of `getBasicBlockAfter` in loops (the call you cached) that might also benefit from this.
I am not sure if it's worth wrapping this in a helper that returns the cache, possibly parameterized by `IgnoreSplits` as well. Then others can re-use.

You can use the `ninja check-bolt` target to run the unit / lit tests.

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


More information about the llvm-commits mailing list