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

Usman Nadeem via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 31 18:27:43 PDT 2024


UsmanNadeem 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 to me...
> 
> I wonder why we can't use unpreserved loop analysis here, it seems that JumpThreading doesn't preserve it after DFAJumpThreading in pipeline.

@nikic Any comments about this?

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


More information about the llvm-commits mailing list