[PATCH] D90115: [LoopDeletion] Remove dead loops with no exit blocks

Atmn Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 25 02:21:08 PDT 2020


atmnpatel created this revision.
atmnpatel added reviewers: jdoerfert, reames, nikic.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
atmnpatel requested review of this revision.

Currently, LoopDeletion refuses to remove dead loops with no exit blocks
because it cannot statically determine the control flow after it removes
the block. This leads to miscompiles if the loop is an infinite loop and
should've been removed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90115

Files:
  llvm/include/llvm/Analysis/LoopInfo.h
  llvm/include/llvm/Analysis/LoopInfoImpl.h
  llvm/lib/Transforms/Scalar/LoopDeletion.cpp
  llvm/lib/Transforms/Utils/LoopUtils.cpp
  llvm/test/Transforms/LoopDeletion/mustprogress.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90115.300530.patch
Type: text/x-patch
Size: 11902 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201025/e87dbfce/attachment.bin>


More information about the llvm-commits mailing list