[llvm] [DFAJumpThreading] Avoid exploring the paths that never come back (PR #85505)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 09:59:00 PDT 2024
efriedma-quic wrote:
There isn't any technical reason you have to preserve LoopInfo, as far as I know. The only real downside is that it has to be recomputed later.
That said, using LoopInfo and not preserving it is extremely rare; I'd expect explicit comments noting it in the list of preserved analysis, and at the point where the LoopInfo ceases to be valid.
You should still be able to verify() the LoopInfo before it becomes invalid. Given the way the pass is structured, that can just be guarded by NDEBUG (running it once per function isn't that expensive; we guard it with EXPENSIVE_CHECKS in a lot of places because running it once per loop doesn't scale).
https://github.com/llvm/llvm-project/pull/85505
More information about the llvm-commits
mailing list