[PATCH] D51519: [SimpleLoopUnswitch] remove a chain of dead blocks at once

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 30 15:30:02 PDT 2018


fedor.sergeev created this revision.
fedor.sergeev added reviewers: asbirlea, chandlerc.

Recent change to deleteDeadBlocksFromLoop was not enough to
fix all the problems related to dead blocks after nontrivial
unswitching of switches.

We need to delete all the dead blocks that were created during
unswitching, otherwise we will keep having problems with phi's
or dead blocks.

This change is (most likely) not fully correct, since it removes
all the dead blocks that are reachable from the loop, not trying
to track whether these blocks are newly created by unswitching
or not.

It does fix all the failures currently known, in particular PR38778.


Repository:
  rL LLVM

https://reviews.llvm.org/D51519

Files:
  lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
  test/Transforms/SimpleLoopUnswitch/delete-dead-blocks.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51519.163432.patch
Type: text/x-patch
Size: 3282 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180830/3e5dc3a8/attachment.bin>


More information about the llvm-commits mailing list