[LV] Rename Region to TargetRegion, similar to SinkRegion (NFC).
authorFlorian Hahn <flo@fhahn.com>
Fri, 7 May 2021 19:21:36 +0000 (20:21 +0100)
committerFlorian Hahn <flo@fhahn.com>
Fri, 7 May 2021 20:25:35 +0000 (21:25 +0100)
Adjust the name to make it clearer this is the region containing the
target recipe, similar to SinkRegion below.

Suggested post-commit for ccebf7a1096a.

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

index b99b676..5b61734 100644 (file)
@@ -9118,12 +9118,13 @@ VPlanPtr LoopVectorizationPlanner::buildVPlanWithVPRecipes(
 
     // If the target is in a replication region, make sure to move Sink to the
     // block after it, not into the replication region itself.
-    if (auto *Region =
+    if (auto *TargetRegion =
             dyn_cast_or_null<VPRegionBlock>(Target->getParent()->getParent())) {
-      if (Region->isReplicator()) {
-        assert(Region->getNumSuccessors() == 1 && "Expected SESE region!");
+      if (TargetRegion->isReplicator()) {
+        assert(TargetRegion->getNumSuccessors() == 1 &&
+               "Expected SESE region!");
         VPBasicBlock *NextBlock =
-            cast<VPBasicBlock>(Region->getSuccessors().front());
+            cast<VPBasicBlock>(TargetRegion->getSuccessors().front());
         Sink->moveBefore(*NextBlock, NextBlock->getFirstNonPhi());
         continue;
       }