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

Sameer Sahasrabuddhe via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 23:49:22 PDT 2024


ssahasra wrote:

> > Maybe all of this can be moved to Transforms/Scalar/JumpThreading.cpp ? simplifycfg is doing too many things which could be better suited as separate passes.
> 
> Yeah, SimplifyCFG has few limited duplications to that dedicated pass. But it should be addressed in another dedicated PR as it may have measurable impacts compared to this one.

I think rather than make a small change to SimplifyCFG, it's better to remove this entirely. JumpThreading.cpp already does the right thing with divergent branches, and any future improvements will happen there. This part of SimplifyCFG actually predates  JumpThreading.cpp by three years! (2005 v/s 2008). 

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


More information about the llvm-commits mailing list