[llvm] [DFAJumpThreading] Avoid exploring the paths that never come back (PR #85505)

via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 06:50:03 PDT 2024


XChy wrote:

@nikic , after investigating the codebase and cases for days, I found it's very hard to preserve the loop analysis during threading (just like JumpThreading can only track loop headers). Because the switch block will be duplicated and the paths are threaded one by one, the loops are broken and created during threading. Only after threading all paths, can we determine the the loop info. But calculating the loop info after threading looks the same as not preserving it...

I wonder why we can't use unpreserved loop analysis here, it seems that JumpThreading doesn't preserve it after DFAJumpThreading in pipeline.

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


More information about the llvm-commits mailing list