@@ -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;
@@ -994,9 +992,9 @@ void VPlan::execute(VPTransformState *State) {
994
992
State->CFG .PrevVPBB = nullptr ;
995
993
State->CFG .ExitBB = State->CFG .PrevBB ->getSingleSuccessor ();
996
994
997
- // Update VPDominatorTree since VPBasicBlock may be removed after State wsa
998
- // constucted .
999
- State->VPDT -> recalculate (*this );
995
+ // Update VPDominatorTree since VPBasicBlock may be removed after State was
996
+ // constructed .
997
+ State->VPDT . recalculate (*this );
1000
998
1001
999
// Disconnect VectorPreHeader from ExitBB in both the CFG and DT.
1002
1000
BasicBlock *VectorPreHeader = State->CFG .PrevBB ;
0 commit comments