[NFC] Use predecessors to replace make_range.
authorjacquesguan <Jianjian.Guan@streamcomputing.com>
Mon, 6 Jun 2022 04:32:35 +0000 (04:32 +0000)
committerjacquesguan <Jianjian.Guan@streamcomputing.com>
Tue, 7 Jun 2022 02:22:35 +0000 (02:22 +0000)
Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D127085

polly/lib/CodeGen/BlockGenerators.cpp

index a98cfa1..60d6b76 100644 (file)
@@ -1588,7 +1588,7 @@ void RegionGenerator::copyStmt(ScopStmt &Stmt, LoopToScevMapT &LTS,
     LoopPHI->insertBefore(&BBCopy->front());
     LoopPHIInc->insertBefore(BBCopy->getTerminator());
 
-    for (auto *PredBB : make_range(pred_begin(BB), pred_end(BB))) {
+    for (auto *PredBB : predecessors(BB)) {
       if (!R->contains(PredBB))
         continue;
       if (L->contains(PredBB))
@@ -1597,7 +1597,7 @@ void RegionGenerator::copyStmt(ScopStmt &Stmt, LoopToScevMapT &LTS,
         LoopPHI->addIncoming(NullVal, EndBlockMap[PredBB]);
     }
 
-    for (auto *PredBBCopy : make_range(pred_begin(BBCopy), pred_end(BBCopy)))
+    for (auto *PredBBCopy : predecessors(BBCopy))
       if (LoopPHI->getBasicBlockIndex(PredBBCopy) < 0)
         LoopPHI->addIncoming(NullVal, PredBBCopy);