@@ -3714,8 +3714,7 @@ class VPRegionBlock : public VPBlockBase {
37143714 : VPBlockBase(VPRegionBlockSC, Name), Entry(nullptr ), Exiting(nullptr ),
37153715 IsReplicator(IsReplicator) {}
37163716
3717- ~VPRegionBlock () override {
3718- }
3717+ ~VPRegionBlock () override {}
37193718
37203719 // / Method to support type inquiry through isa, cast, and dyn_cast.
37213720 static inline bool classof (const VPBlockBase *V) {
@@ -3841,6 +3840,8 @@ class VPlan {
38413840 // / been modeled in VPlan directly.
38423841 DenseMap<const SCEV *, VPValue *> SCEVToExpansion;
38433842
3843+ // / Blocks allocated and owned by the VPlan. They will be deleted once the
3844+ // / VPlan is destroyed.
38443845 SmallVector<VPBlockBase *> CreatedBlocks;
38453846
38463847public:
@@ -4060,13 +4061,19 @@ class VPlan {
40604061 // / recipes to refer to the clones, and return it.
40614062 VPlan *duplicate ();
40624063
4064+ // / Create a new VPBasicBlock with \p Name and containing \p Recipe if
4065+ // / present. The returned block is owned by the VPlan and deleted once the
4066+ // / VPlan is destroyed.
40634067 VPBasicBlock *createVPBasicBlock (const Twine &Name,
40644068 VPRecipeBase *Recipe = nullptr ) {
40654069 auto *VPB = new VPBasicBlock (Name, Recipe);
40664070 CreatedBlocks.push_back (VPB);
40674071 return VPB;
40684072 }
40694073
4074+ // / Create a new VPRegionBlock with \p Entry, \p Exiting and \p Name. If \p
4075+ // / IsReplicator is true, the region is a replicate region. The returned block
4076+ // / is owned by the VPlan and deleted once the VPlan is destroyed.
40704077 VPRegionBlock *createVPRegionBlock (VPBlockBase *Entry, VPBlockBase *Exiting,
40714078 const std::string &Name = " " ,
40724079 bool IsReplicator = false ) {
@@ -4075,6 +4082,10 @@ class VPlan {
40754082 return VPB;
40764083 }
40774084
4085+ // / Create a new VPRegionBlock with \p Name and entry and exiting blocks set
4086+ // / to nullptr. If \p IsReplicator is true, the region is a replicate region.
4087+ // / The returned block is owned by the VPlan and deleted once the VPlan is
4088+ // / destroyed.
40784089 VPRegionBlock *createVPRegionBlock (const std::string &Name = " " ,
40794090 bool IsReplicator = false ) {
40804091 auto *VPB = new VPRegionBlock (Name, IsReplicator);
@@ -4084,6 +4095,8 @@ class VPlan {
40844095
40854096 // / Create a VPIRBasicBlock from \p IRBB containing VPIRInstructions for all
40864097 // / instructions in \p IRBB, except its terminator which is managed in VPlan.
4098+ // / The returned block is owned by the VPlan and deleted once the VPlan is
4099+ // / destroyed.
40874100 VPIRBasicBlock *createVPIRBasicBlock (BasicBlock *IRBB);
40884101};
40894102
0 commit comments