[PATCH] D113081: [LowerSwitch] Delete all new dead blocks accurately

Yilong Guo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 2 22:32:12 PDT 2021


Nuullll created this revision.
Herald added a subscriber: hiraditya.
Nuullll requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

https://llvm.org/pr52383

LowerSwitch should be responsible for removing all newly introduced dead blocks.
The original implementation only deleted the unreachable default block itself, leaving
its dominatee-successors (if any) unreachable.

This patch uses DominatorTree so that we know the accurate set of blocks that need to
be removed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113081

Files:
  llvm/lib/Transforms/Utils/LowerSwitch.cpp
  llvm/test/Transforms/LowerSwitch/delete-all-new-dead-blocks.ll
  llvm/test/Transforms/Util/lowerswitch.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113081.384335.patch
Type: text/x-patch
Size: 10033 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211103/ff5f9c24/attachment.bin>


More information about the llvm-commits mailing list