[PATCH] D81225: Correctly report modified status for LoopDistribute
serge via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 8 12:42:20 PDT 2020
serge-sans-paille updated this revision to Diff 269319.
serge-sans-paille added a comment.
Ooops™ uploaded the wrong patch, restoring the correct version.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81225/new/
https://reviews.llvm.org/D81225
Files:
llvm/lib/Transforms/Scalar/LoopDistribute.cpp
Index: llvm/lib/Transforms/Scalar/LoopDistribute.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/LoopDistribute.cpp
+++ llvm/lib/Transforms/Scalar/LoopDistribute.cpp
@@ -789,12 +789,6 @@
// instructions to partitions.
Partitions.setupPartitionIdOnInstructions();
- // To keep things simple have an empty preheader before we version or clone
- // the loop. (Also split if this has no predecessor, i.e. entry, because we
- // rely on PH having a predecessor.)
- if (!PH->getSinglePredecessor() || &*PH->begin() != PH->getTerminator())
- SplitBlock(PH, PH->getTerminator(), DT, LI);
-
// If we need run-time checks, version the loop now.
auto PtrToPartition = Partitions.computePartitionSetForPointers(*LAI);
const auto *RtPtrChecking = LAI->getRuntimePointerChecking();
@@ -807,6 +801,13 @@
"may not insert runtime check with convergent operation");
}
+ // To keep things simple have an empty preheader before we version or clone
+ // the loop. (Also split if this has no predecessor, i.e. entry, because we
+ // rely on PH having a predecessor.)
+ if (!PH->getSinglePredecessor() || &*PH->begin() != PH->getTerminator()) {
+ SplitBlock(PH, PH->getTerminator(), DT, LI);
+ }
+
if (!Pred.isAlwaysTrue() || !Checks.empty()) {
assert(!LAI->hasConvergentOp() && "inserting illegal loop versioning");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81225.269319.patch
Type: text/x-patch
Size: 1455 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200608/59d62c92/attachment.bin>
More information about the llvm-commits
mailing list