[llvm] [SimplifyCFG] Skip threading if the target may have divergent branches (PR #100185)

Sameer Sahasrabuddhe via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 23:53:06 PDT 2024


ssahasra wrote:

> Not only does phase order matter but `llvm::simplifyCFG` is also invoked in other places (one in debug info and the other in AMDGPU's exit, not unification). Simply removing them will trigger up to 21 lit regressions (in my local build), not to mention performance regression (or gain, if possible) for real workloads. I suggest we add this simple workaround first, try to move threading parts into JumpThreading, and refactor JumpThreading into not only a pass but, for simpleCFG to invoke threading functionalities, a library where we could add centralized control on divergent CFG or other fine tune knobs. Any idea?

Sounds good to me, but no immediate thoughts on how to go about doing it.

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


More information about the llvm-commits mailing list