@@ -716,7 +716,7 @@ void VPlanTransforms::optimizeForVFAndUF(VPlan &Plan, ElementCount BestVF,
716
716
}
717
717
718
718
#ifndef NDEBUG
719
- static VPRegionBlock *GetReplicateRegion (VPRecipeBase *R) {
719
+ static VPRegionBlock *getReplicateRegion (VPRecipeBase *R) {
720
720
auto *Region = dyn_cast_or_null<VPRegionBlock>(R->getParent ()->getParent ());
721
721
if (Region && Region->isReplicator ()) {
722
722
assert (Region->getNumSuccessors () == 1 &&
@@ -749,9 +749,9 @@ static bool properlyDominates(const VPRecipeBase *A, const VPRecipeBase *B,
749
749
if (ParentA == ParentB)
750
750
return LocalComesBefore (A, B);
751
751
752
- assert (!GetReplicateRegion (const_cast <VPRecipeBase *>(A)) &&
752
+ assert (!getReplicateRegion (const_cast <VPRecipeBase *>(A)) &&
753
753
" No replicate regions expected at this point" );
754
- assert (!GetReplicateRegion (const_cast <VPRecipeBase *>(B)) &&
754
+ assert (!getReplicateRegion (const_cast <VPRecipeBase *>(B)) &&
755
755
" No replicate regions expected at this point" );
756
756
return VPDT.properlyDominates (ParentA, ParentB);
757
757
}
@@ -1100,10 +1100,11 @@ void VPlanTransforms::truncateToMinimalBitwidths(
1100
1100
ResultVPV->replaceAllUsesWith (Ext);
1101
1101
Ext->setOperand (0 , ResultVPV);
1102
1102
assert (OldResSizeInBits > NewResSizeInBits && " Nothing to shrink?" );
1103
- } else
1103
+ } else {
1104
1104
assert (
1105
1105
match (&R, m_Binary<Instruction::ICmp>(m_VPValue (), m_VPValue ())) &&
1106
1106
" Only ICmps should not need extending the result." );
1107
+ }
1107
1108
1108
1109
assert (!isa<VPWidenStoreRecipe>(&R) && " stores cannot be narrowed" );
1109
1110
if (isa<VPWidenLoadRecipe>(&R))
@@ -1242,7 +1243,7 @@ static VPActiveLaneMaskPHIRecipe *addVPLaneMaskPhiAndUpdateExitBranch(
1242
1243
1243
1244
// Now create the ActiveLaneMaskPhi recipe in the main loop using the
1244
1245
// preheader ActiveLaneMask instruction.
1245
- auto LaneMaskPhi = new VPActiveLaneMaskPHIRecipe (EntryALM, DebugLoc ());
1246
+ auto * LaneMaskPhi = new VPActiveLaneMaskPHIRecipe (EntryALM, DebugLoc ());
1246
1247
LaneMaskPhi->insertAfter (CanonicalIVPHI);
1247
1248
1248
1249
// Create the active lane mask for the next iteration of the loop before the
@@ -1318,7 +1319,7 @@ void VPlanTransforms::addActiveLaneMask(
1318
1319
" DataAndControlFlowWithoutRuntimeCheck implies "
1319
1320
" UseActiveLaneMaskForControlFlow" );
1320
1321
1321
- auto FoundWidenCanonicalIVUser =
1322
+ auto * FoundWidenCanonicalIVUser =
1322
1323
find_if (Plan.getCanonicalIV ()->users (),
1323
1324
[](VPUser *U) { return isa<VPWidenCanonicalIVRecipe>(U); });
1324
1325
assert (FoundWidenCanonicalIVUser &&
@@ -1468,14 +1469,13 @@ void VPlanTransforms::dropPoisonGeneratingRecipes(
1468
1469
// Collect recipes in the backward slice of `Root` that may generate a poison
1469
1470
// value that is used after vectorization.
1470
1471
SmallPtrSet<VPRecipeBase *, 16 > Visited;
1471
- auto collectPoisonGeneratingInstrsInBackwardSlice ([&](VPRecipeBase *Root) {
1472
+ auto CollectPoisonGeneratingInstrsInBackwardSlice ([&](VPRecipeBase *Root) {
1472
1473
SmallVector<VPRecipeBase *, 16 > Worklist;
1473
1474
Worklist.push_back (Root);
1474
1475
1475
1476
// Traverse the backward slice of Root through its use-def chain.
1476
1477
while (!Worklist.empty ()) {
1477
- VPRecipeBase *CurRec = Worklist.back ();
1478
- Worklist.pop_back ();
1478
+ VPRecipeBase *CurRec = Worklist.pop_back_val ();
1479
1479
1480
1480
if (!Visited.insert (CurRec).second )
1481
1481
continue ;
@@ -1521,8 +1521,8 @@ void VPlanTransforms::dropPoisonGeneratingRecipes(
1521
1521
}
1522
1522
1523
1523
// Add new definitions to the worklist.
1524
- for (VPValue *operand : CurRec->operands ())
1525
- if (VPRecipeBase *OpDef = operand ->getDefiningRecipe ())
1524
+ for (VPValue *Operand : CurRec->operands ())
1525
+ if (VPRecipeBase *OpDef = Operand ->getDefiningRecipe ())
1526
1526
Worklist.push_back (OpDef);
1527
1527
}
1528
1528
});
@@ -1538,7 +1538,7 @@ void VPlanTransforms::dropPoisonGeneratingRecipes(
1538
1538
VPRecipeBase *AddrDef = WidenRec->getAddr ()->getDefiningRecipe ();
1539
1539
if (AddrDef && WidenRec->isConsecutive () &&
1540
1540
BlockNeedsPredication (UnderlyingInstr.getParent ()))
1541
- collectPoisonGeneratingInstrsInBackwardSlice (AddrDef);
1541
+ CollectPoisonGeneratingInstrsInBackwardSlice (AddrDef);
1542
1542
} else if (auto *InterleaveRec = dyn_cast<VPInterleaveRecipe>(&Recipe)) {
1543
1543
VPRecipeBase *AddrDef = InterleaveRec->getAddr ()->getDefiningRecipe ();
1544
1544
if (AddrDef) {
@@ -1554,7 +1554,7 @@ void VPlanTransforms::dropPoisonGeneratingRecipes(
1554
1554
}
1555
1555
1556
1556
if (NeedPredication)
1557
- collectPoisonGeneratingInstrsInBackwardSlice (AddrDef);
1557
+ CollectPoisonGeneratingInstrsInBackwardSlice (AddrDef);
1558
1558
}
1559
1559
}
1560
1560
}
0 commit comments