@@ -222,9 +222,7 @@ VPTransformState::VPTransformState(const TargetTransformInfo *TTI,
222222 Loop *CurrentParentLoop, Type *CanonicalIVTy)
223223 : TTI(TTI), VF(VF), CFG(DT), LI(LI), Builder(Builder), ILV(ILV), Plan(Plan),
224224 CurrentParentLoop(CurrentParentLoop), LVer(nullptr ),
225- TypeAnalysis(CanonicalIVTy), VPDT(new VPDominatorTree(*Plan)) {}
226-
227- VPTransformState::~VPTransformState () { delete VPDT; }
225+ TypeAnalysis(CanonicalIVTy), VPDT(*Plan) {}
228226
229227Value *VPTransformState::get (VPValue *Def, const VPLane &Lane) {
230228 if (Def->isLiveIn ())
@@ -269,8 +267,8 @@ Value *VPTransformState::get(VPValue *Def, bool NeedsScalar) {
269267 auto GetBroadcastInstrs = [this , Def](Value *V) {
270268 bool SafeToHoist =
271269 !Def->hasDefiningRecipe () ||
272- VPDT-> properlyDominates (Def->getDefiningRecipe ()->getParent (),
273- Plan->getVectorPreheader ());
270+ VPDT. properlyDominates (Def->getDefiningRecipe ()->getParent (),
271+ Plan->getVectorPreheader ());
274272
275273 if (VF.isScalar ())
276274 return V;
@@ -983,9 +981,9 @@ void VPlan::execute(VPTransformState *State) {
983981 State->CFG .PrevVPBB = nullptr ;
984982 State->CFG .ExitBB = State->CFG .PrevBB ->getSingleSuccessor ();
985983
986- // Update VPDominatorTree since VPBasicBlock may be removed after State wsa
987- // constucted .
988- State->VPDT -> recalculate (*this );
984+ // Update VPDominatorTree since VPBasicBlock may be removed after State was
985+ // constructed .
986+ State->VPDT . recalculate (*this );
989987
990988 // Disconnect VectorPreHeader from ExitBB in both the CFG and DT.
991989 BasicBlock *VectorPreHeader = State->CFG .PrevBB ;
0 commit comments