[llvm] [Convergence] Extend cycles to include outside uses of tokens (PR #98006)

Sameer Sahasrabuddhe via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 21:47:48 PDT 2024


ssahasra wrote:

> It looks like the new pass modifies the IR by adding some dummy branches which a pass like jump threading could easily remove again. So, after running the new pass, can you really rely on the IR remaining in "extended cycle" form for very long?

#100185 provides a very useful insight. Extended cycles matter only if an exiting branch is divergent, _and_ a token defined inside the cycle is used outside of it. While that PR is working around divergent branches for performance gain, extended cycles will have to disable the same optimizations for correctness.

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


More information about the llvm-commits mailing list