@@ -598,13 +598,6 @@ class LLVM_ABI_FOR_TEST VPRecipeBase
598598 return R->getVPRecipeID () == VPRecipeID; \
599599 }
600600
601- // / Return the scalar type of \p V. If \p V's scalar type has not been set
602- // / because the defining recipe was not assigned one yet, fall back to
603- // / VPTypeAnalysis using the plan of the defining recipe.
604- // / TODO: Remove once all VPRecipeValues have been migrated to carry their
605- // / types.
606- LLVM_ABI Type *getScalarTypeOrInfer (VPValue *V);
607-
608601// / Compute the scalar result type for an IR \p Opcode given \p Operands.
609602LLVM_ABI Type *computeScalarTypeForInstruction (unsigned Opcode,
610603 ArrayRef<VPValue *> Operands);
@@ -2204,7 +2197,7 @@ class LLVM_ABI_FOR_TEST VPWidenGEPRecipe : public VPRecipeWithIRFlags {
22042197 DebugLoc DL = DebugLoc::getUnknown(),
22052198 GetElementPtrInst *UV = nullptr )
22062199 : VPRecipeWithIRFlags(VPRecipeBase::VPWidenGEPSC, Operands,
2207- getScalarTypeOrInfer ( Operands[0 ]), Flags, DL),
2200+ Operands[0 ]-> getScalarType ( ), Flags, DL),
22082201 SourceElementTy(SourceElementTy) {
22092202 if (UV) {
22102203 setUnderlyingValue (UV);
@@ -2266,7 +2259,7 @@ class VPVectorEndPointerRecipe : public VPRecipeWithIRFlags {
22662259 VPVectorEndPointerRecipe (VPValue *Ptr, VPValue *VF, Type *SourceElementTy,
22672260 int64_t Stride, GEPNoWrapFlags GEPFlags, DebugLoc DL)
22682261 : VPRecipeWithIRFlags(VPRecipeBase::VPVectorEndPointerSC, {Ptr, VF},
2269- getScalarTypeOrInfer ( Ptr), GEPFlags, DL),
2262+ Ptr-> getScalarType ( ), GEPFlags, DL),
22702263 SourceElementTy(SourceElementTy), Stride(Stride) {
22712264 assert (Stride < 0 && " Stride must be negative" );
22722265 }
@@ -2337,7 +2330,7 @@ class VPVectorPointerRecipe : public VPRecipeWithIRFlags {
23372330 GEPNoWrapFlags GEPFlags, DebugLoc DL)
23382331 : VPRecipeWithIRFlags(VPRecipeBase::VPVectorPointerSC,
23392332 ArrayRef<VPValue *>({Ptr, Stride}),
2340- getScalarTypeOrInfer ( Ptr), GEPFlags, DL),
2333+ Ptr-> getScalarType ( ), GEPFlags, DL),
23412334 SourceElementTy(SourceElementTy) {}
23422335
23432336 VP_CLASSOF_IMPL (VPRecipeBase::VPVectorPointerSC)
@@ -2415,7 +2408,7 @@ class LLVM_ABI_FOR_TEST VPHeaderPHIRecipe : public VPSingleDefRecipe,
24152408 VPHeaderPHIRecipe (unsigned char VPRecipeID, Instruction *UnderlyingInstr,
24162409 VPValue *Start, DebugLoc DL = DebugLoc::getUnknown())
24172410 : VPHeaderPHIRecipe(VPRecipeID, UnderlyingInstr, Start,
2418- getScalarTypeOrInfer ( Start), DL) {}
2411+ Start-> getScalarType ( ), DL) {}
24192412
24202413 VPHeaderPHIRecipe (unsigned char VPRecipeID, Instruction *UnderlyingInstr,
24212414 VPValue *Start, Type *ResultTy, DebugLoc DL)
@@ -2489,7 +2482,7 @@ class VPWidenInductionRecipe : public VPHeaderPHIRecipe {
24892482 VPValue *Step, const InductionDescriptor &IndDesc,
24902483 DebugLoc DL)
24912484 : VPWidenInductionRecipe(Kind, IV, Start, Step, IndDesc,
2492- getScalarTypeOrInfer ( Start), DL) {}
2485+ Start-> getScalarType ( ), DL) {}
24932486
24942487 VPWidenInductionRecipe (unsigned char Kind, PHINode *IV, VPValue *Start,
24952488 VPValue *Step, const InductionDescriptor &IndDesc,
@@ -2715,7 +2708,7 @@ class LLVM_ABI_FOR_TEST VPWidenPHIRecipe : public VPSingleDefRecipe,
27152708 VPWidenPHIRecipe (ArrayRef<VPValue *> IncomingValues,
27162709 DebugLoc DL = DebugLoc::getUnknown(), const Twine &Name = " " )
27172710 : VPSingleDefRecipe(VPRecipeBase::VPWidenPHISC, IncomingValues,
2718- getScalarTypeOrInfer ( IncomingValues[0 ]),
2711+ IncomingValues[0 ]-> getScalarType ( ),
27192712 /* UV=*/ nullptr, DL),
27202713 Name(Name.str()) {
27212714 assert (all_of (IncomingValues,
@@ -3643,7 +3636,7 @@ class LLVM_ABI_FOR_TEST VPPredInstPHIRecipe : public VPSingleDefRecipe {
36433636 // / nodes after merging back from a Branch-on-Mask.
36443637 VPPredInstPHIRecipe (VPValue *PredV, DebugLoc DL)
36453638 : VPSingleDefRecipe(VPRecipeBase::VPPredInstPHISC, PredV,
3646- getScalarTypeOrInfer ( PredV), /* UV=*/ nullptr, DL) {}
3639+ PredV-> getScalarType ( ), /* UV=*/ nullptr, DL) {}
36473640 ~VPPredInstPHIRecipe () override = default ;
36483641
36493642 VPPredInstPHIRecipe *clone () override {
@@ -4179,7 +4172,7 @@ class LLVM_ABI_FOR_TEST VPScalarIVStepsRecipe : public VPRecipeWithIRFlags {
41794172 Instruction::BinaryOps Opcode, FastMathFlags FMFs,
41804173 DebugLoc DL)
41814174 : VPRecipeWithIRFlags(VPRecipeBase::VPScalarIVStepsSC, {IV, Step, VF},
4182- getScalarTypeOrInfer (IV ), FMFs, DL),
4175+ IV-> getScalarType ( ), FMFs, DL),
41834176 InductionOpcode(Opcode) {}
41844177
41854178 VPScalarIVStepsRecipe (const InductionDescriptor &IndDesc, VPValue *IV,
0 commit comments