[PATCH] D155940: [SimplifyCFG] Transform for merging the combination of phis in switch

Hongyu Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 29 02:05:40 PDT 2023


XChy updated this revision to Diff 545346.
XChy added a comment.

- Add complete positive tests
- Fix bugs about preserving domtree

**Enhance further possible**: If BB and Succ share more than one predecessor and combine some phis meanwhile, we can also simplify CFG.
However, we are not able to erase the phi in BB completely here. Does it make sense still?
example <https://alive2.llvm.org/ce/z/AdGadM>


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155940/new/

https://reviews.llvm.org/D155940

Files:
  llvm/lib/Transforms/Utils/Local.cpp
  llvm/test/CodeGen/ARM/jump-table-islands.ll
  llvm/test/Transforms/SimplifyCFG/branch-fold.ll
  llvm/test/Transforms/SimplifyCFG/merge-phis-in-switch.ll
  llvm/test/Transforms/SimplifyCFG/multiple-phis.ll
  llvm/test/Transforms/SimplifyCFG/switch-simplify-crash2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155940.545346.patch
Type: text/x-patch
Size: 26840 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230729/1517c4e7/attachment-0001.bin>


More information about the llvm-commits mailing list