[LV] Rename Region to TargetRegion, similar to SinkRegion (NFC).

Adjust the name to make it clearer this is the region containing the
target recipe, similar to SinkRegion below.

Suggested post-commit for ccebf7a109.
This commit is contained in:
Florian Hahn 2021-05-07 20:21:36 +01:00
parent 01c78a0b07
commit 01c26d4e04
No known key found for this signature in database
GPG Key ID: 5967502C5AE88DAD
1 changed files with 5 additions and 4 deletions

View 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;
}