[PATCH] D118472: [LoopPeel] Check for non-LCSSA form loops

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 28 07:36:13 PST 2022


anna created this revision.
anna added reviewers: fhahn, mkazantsev, reames.
Herald added subscribers: zzheng, hiraditya, mgorny.
anna requested review of this revision.
Herald added a project: LLVM.

Currently, the way loop peeling is done, it requires LCSSA form.
We need to add this as a check in canPeel (similar to the requirement
for LoopSimplifyForm in canPeel). Without the check if we peel
non-LCSSA loops, we end up breaking SSA form on uses outside the loop.
This cannot be seen upstream because all uses of loop peeling is done on
LCSSA form loops.

Added a unit test for this.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118472

Files:
  llvm/include/llvm/Transforms/Utils/LoopPeel.h
  llvm/lib/Transforms/Scalar/LoopFuse.cpp
  llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
  llvm/lib/Transforms/Utils/LoopPeel.cpp
  llvm/unittests/Transforms/Utils/CMakeLists.txt
  llvm/unittests/Transforms/Utils/LoopPeelTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118472.404020.patch
Type: text/x-patch
Size: 9164 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220128/bc8f74e2/attachment.bin>


More information about the llvm-commits mailing list