[PATCH] D44199: [LoopRotate] Attempt to Rotate loops if it can lead to removing phi nodes.
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 7 03:53:06 PST 2018
dmgreen created this revision.
dmgreen added reviewers: efriedma, atrick, skatkov, pacxx.
Fix for a loop-rotation based regression we have seen recently. Prior to https://reviews.llvm.org/rL324572 in
this case we would enter loop rotate with a loop with three blocks, the last of which
is an empty latch. Loop rotate would remove the empty latch, and because it did
(SimplifiedLatch=true), would choose to rotate the loop.
We now remove the empty loop latch in simplifycfg, so loop rotate doesn't find the
latch to simplify (SimplifiedLatch=false), and does nothing with the loop. In this case
the loop keeps track of a current list node and prev list node. Rotating the loop
means we don't need to keep track of prev, removing a phi node.
https://reviews.llvm.org/D44199
Files:
lib/Transforms/Scalar/LoopRotation.cpp
test/Transforms/LoopRotate/loopexitinglatch.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44199.137353.patch
Type: text/x-patch
Size: 8283 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180307/090f710c/attachment.bin>
More information about the llvm-commits
mailing list