Commit fa2eabd
authored
[SimplifyCFG] Hoist common code for switch multi-case destinations (#165700)
Previously, hoistCommonCodeFromSuccessors did not support hoisting
common code for multi-case destinations of `switch`.
However, if all the predecessors of a given Succ are the same (i.e.,
multi-case destination), it is safe to hoist the common code from Succ
to Pred, which is what this PR does.
See discussion
#165570 (comment).
Alive2 proof: https://alive2.llvm.org/ce/z/cYuczq
Optimization Impact:
dtcxzyw/llvm-opt-benchmark#30031 parent 5fc8e87 commit fa2eabd
File tree
3 files changed
+242
-223
lines changed- clang/test/Headers
- llvm
- lib/Transforms/Utils
- test/Transforms/SimplifyCFG
3 files changed
+242
-223
lines changed
0 commit comments