@@ -316,7 +316,7 @@ static bool mergeReplicateRegionsIntoSuccessors(VPlan &Plan) {
316316 });
317317
318318 // Remove phi recipes that are unused after merging the regions.
319- if (Phi1ToMove.getVPSingleValue ()->getNumUsers () == 0 ) {
319+ if (Phi1ToMove.getVPSingleValue ()->getNumUses () == 0 ) {
320320 Phi1ToMove.eraseFromParent ();
321321 continue ;
322322 }
@@ -363,7 +363,7 @@ static VPRegionBlock *createReplicateRegion(VPReplicateRecipe *PredRecipe,
363363 Plan.createVPBasicBlock (Twine (RegionName) + " .if" , RecipeWithoutMask);
364364
365365 VPPredInstPHIRecipe *PHIRecipe = nullptr ;
366- if (PredRecipe->getNumUsers () != 0 ) {
366+ if (PredRecipe->getNumUses () != 0 ) {
367367 PHIRecipe = new VPPredInstPHIRecipe (RecipeWithoutMask,
368368 RecipeWithoutMask->getDebugLoc ());
369369 PredRecipe->replaceAllUsesWith (PHIRecipe);
@@ -547,7 +547,7 @@ static bool isDeadRecipe(VPRecipeBase &R) {
547547
548548 // Recipe is dead if no user keeps the recipe alive.
549549 return all_of (R.definedValues (),
550- [](VPValue *V) { return V->getNumUsers () == 0 ; });
550+ [](VPValue *V) { return V->getNumUses () == 0 ; });
551551}
552552
553553void VPlanTransforms::removeDeadRecipes (VPlan &Plan) {
@@ -563,11 +563,11 @@ void VPlanTransforms::removeDeadRecipes(VPlan &Plan) {
563563
564564 // Check if R is a dead VPPhi <-> update cycle and remove it.
565565 auto *PhiR = dyn_cast<VPPhi>(&R);
566- if (!PhiR || PhiR->getNumOperands () != 2 || PhiR->getNumUsers () != 1 )
566+ if (!PhiR || PhiR->getNumOperands () != 2 || PhiR->getNumUses () != 1 )
567567 continue ;
568568 VPValue *Incoming = PhiR->getOperand (1 );
569569 if (*PhiR->user_begin () != Incoming->getDefiningRecipe () ||
570- Incoming->getNumUsers () != 1 )
570+ Incoming->getNumUses () != 1 )
571571 continue ;
572572 PhiR->replaceAllUsesWith (PhiR->getOperand (0 ));
573573 PhiR->eraseFromParent ();
@@ -658,7 +658,7 @@ static void legalizeAndOptimizeInductions(VPlan &Plan) {
658658 auto *RepR = dyn_cast<VPReplicateRecipe>(U);
659659 // Skip recipes that shouldn't be narrowed.
660660 if (!Def || !isa<VPReplicateRecipe, VPWidenRecipe>(Def) ||
661- Def->getNumUsers () == 0 || !Def->getUnderlyingValue () ||
661+ Def->getNumUses () == 0 || !Def->getUnderlyingValue () ||
662662 (RepR && (RepR->isSingleScalar () || RepR->isPredicated ())))
663663 continue ;
664664
@@ -1344,7 +1344,7 @@ static void simplifyBlends(VPlan &Plan) {
13441344 // TODO: Find the most expensive mask that can be deadcoded, or a mask
13451345 // that's used by multiple blends where it can be removed from them all.
13461346 VPValue *Mask = Blend->getMask (I);
1347- if (Mask->getNumUsers () == 1 && !match (Mask, m_False ())) {
1347+ if (Mask->getNumUses () == 1 && !match (Mask, m_False ())) {
13481348 StartIndex = I;
13491349 break ;
13501350 }
@@ -1380,7 +1380,7 @@ static void simplifyBlends(VPlan &Plan) {
13801380 NewBlend->setOperand (0 , Inc1);
13811381 NewBlend->setOperand (1 , Inc0);
13821382 NewBlend->setOperand (2 , NewMask);
1383- if (OldMask->getNumUsers () == 0 )
1383+ if (OldMask->getNumUses () == 0 )
13841384 cast<VPInstruction>(OldMask)->eraseFromParent ();
13851385 }
13861386 }
@@ -2467,7 +2467,7 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
24672467 ToErase.push_back (CurRecipe);
24682468 }
24692469 // Remove dead EVL mask.
2470- if (EVLMask->getNumUsers () == 0 )
2470+ if (EVLMask->getNumUses () == 0 )
24712471 ToErase.push_back (EVLMask->getDefiningRecipe ());
24722472
24732473 for (VPRecipeBase *R : reverse (ToErase)) {
@@ -3445,7 +3445,7 @@ void VPlanTransforms::materializeBroadcasts(VPlan &Plan) {
34453445#endif
34463446
34473447 SmallVector<VPValue *> VPValues;
3448- if (Plan.getOrCreateBackedgeTakenCount ()->getNumUsers () > 0 )
3448+ if (Plan.getOrCreateBackedgeTakenCount ()->getNumUses () > 0 )
34493449 VPValues.push_back (Plan.getOrCreateBackedgeTakenCount ());
34503450 append_range (VPValues, Plan.getLiveIns ());
34513451 for (VPRecipeBase &R : *Plan.getEntry ())
@@ -3514,7 +3514,7 @@ void VPlanTransforms::materializeConstantVectorTripCount(
35143514void VPlanTransforms::materializeBackedgeTakenCount (VPlan &Plan,
35153515 VPBasicBlock *VectorPH) {
35163516 VPValue *BTC = Plan.getOrCreateBackedgeTakenCount ();
3517- if (BTC->getNumUsers () == 0 )
3517+ if (BTC->getNumUses () == 0 )
35183518 return ;
35193519
35203520 VPBuilder Builder (VectorPH, VectorPH->begin ());
@@ -3580,7 +3580,7 @@ void VPlanTransforms::materializeVectorTripCount(VPlan &Plan,
35803580 assert (VectorTC.isLiveIn () && " vector-trip-count must be a live-in" );
35813581 // There's nothing to do if there are no users of the vector trip count or its
35823582 // IR value has already been set.
3583- if (VectorTC.getNumUsers () == 0 || VectorTC.getLiveInIRValue ())
3583+ if (VectorTC.getNumUses () == 0 || VectorTC.getLiveInIRValue ())
35843584 return ;
35853585
35863586 VPValue *TC = Plan.getTripCount ();
@@ -3645,7 +3645,7 @@ void VPlanTransforms::materializeVFAndVFxUF(VPlan &Plan, VPBasicBlock *VectorPH,
36453645
36463646 // If there are no users of the runtime VF, compute VFxUF by constant folding
36473647 // the multiplication of VF and UF.
3648- if (VF.getNumUsers () == 0 ) {
3648+ if (VF.getNumUses () == 0 ) {
36493649 VPValue *RuntimeVFxUF =
36503650 Builder.createElementCount (TCTy, VFEC * Plan.getUF ());
36513651 VFxUF.replaceAllUsesWith (RuntimeVFxUF);
0 commit comments