@@ -222,9 +222,7 @@ VPTransformState::VPTransformState(const TargetTransformInfo *TTI,
222
222
Loop *CurrentParentLoop, Type *CanonicalIVTy)
223
223
: TTI(TTI), VF(VF), CFG(DT), LI(LI), Builder(Builder), ILV(ILV), Plan(Plan),
224
224
CurrentParentLoop(CurrentParentLoop), LVer(nullptr ),
225
- TypeAnalysis(CanonicalIVTy), VPDT(new VPDominatorTree(*Plan)) {}
226
-
227
- VPTransformState::~VPTransformState () { delete VPDT; }
225
+ TypeAnalysis(CanonicalIVTy), VPDT(*Plan) {}
228
226
229
227
Value *VPTransformState::get (VPValue *Def, const VPLane &Lane) {
230
228
if (Def->isLiveIn ())
@@ -269,8 +267,8 @@ Value *VPTransformState::get(VPValue *Def, bool NeedsScalar) {
269
267
auto GetBroadcastInstrs = [this , Def](Value *V) {
270
268
bool SafeToHoist =
271
269
!Def->hasDefiningRecipe () ||
272
- VPDT-> properlyDominates (Def->getDefiningRecipe ()->getParent (),
273
- Plan->getVectorPreheader ());
270
+ VPDT. properlyDominates (Def->getDefiningRecipe ()->getParent (),
271
+ Plan->getVectorPreheader ());
274
272
275
273
if (VF.isScalar ())
276
274
return V;
@@ -983,9 +981,9 @@ void VPlan::execute(VPTransformState *State) {
983
981
State->CFG .PrevVPBB = nullptr ;
984
982
State->CFG .ExitBB = State->CFG .PrevBB ->getSingleSuccessor ();
985
983
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 );
989
987
990
988
// Disconnect VectorPreHeader from ExitBB in both the CFG and DT.
991
989
BasicBlock *VectorPreHeader = State->CFG .PrevBB ;
0 commit comments