[llvm] [NFC] Move RemoveRedundantDbgInstrs outside of inner loop in JumpThreading (PR #123008)
Stephen Tozer via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 15 03:10:07 PST 2025
SLTozer wrote:
Optimizing this seems valuable, but it probably needs to be checked against the original reproducer. Removing redundant debug instructions in InstCombine isn't necessary at all in most cases, but for some pathological inputs we see a massive multiplication of debug intrinsics until the compiler runs out of memory. The reason we therefore remove intrinsics inside the loop rather than after it is because if we wait until after all the iterations have run, we may have already produced enough intrinsics to break the compiler.
Unfortunately, the info for the specific build has since been discarded, and the buildbot on which the issue appeared is no longer active. But the old commit message indicates that it was an issue with ThreadSanitizer builds, so I can check 1) whether I can reproduce the original issue if the cleanup step is removed, and 2) whether this change leads to the error manifesting again.
https://github.com/llvm/llvm-project/pull/123008
More information about the llvm-commits
mailing list