[llvm] [SimplifyCFG] Don't limit the number of simultaneous forwards from switch condition (PR #95932)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 20 01:08:41 PDT 2024


nikic wrote:

It's a tricky question. I'd generally say that having constants instead of variables is "more canonical" -- and in fact, we have quite a lot of passes that will undo what SimplifyCFG does here. At least IPSCCP, CVP and GVN do this. This is bad in itself, because it means that IR toggles back and forth between two forms. Conversely, it also means that many passes have a chance to optimize IR in both forms. The backend generally prefers phi operands not to be constants (though this is a pretty generic problem and SimplifyCFG isn't really the place to address it I think).

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


More information about the llvm-commits mailing list