@@ -3714,8 +3714,7 @@ class VPRegionBlock : public VPBlockBase {
3714
3714
: VPBlockBase(VPRegionBlockSC, Name), Entry(nullptr ), Exiting(nullptr ),
3715
3715
IsReplicator(IsReplicator) {}
3716
3716
3717
- ~VPRegionBlock () override {
3718
- }
3717
+ ~VPRegionBlock () override {}
3719
3718
3720
3719
// / Method to support type inquiry through isa, cast, and dyn_cast.
3721
3720
static inline bool classof (const VPBlockBase *V) {
@@ -3841,6 +3840,8 @@ class VPlan {
3841
3840
// / been modeled in VPlan directly.
3842
3841
DenseMap<const SCEV *, VPValue *> SCEVToExpansion;
3843
3842
3843
+ // / Blocks allocated and owned by the VPlan. They will be deleted once the
3844
+ // / VPlan is destroyed.
3844
3845
SmallVector<VPBlockBase *> CreatedBlocks;
3845
3846
3846
3847
public:
@@ -4060,13 +4061,19 @@ class VPlan {
4060
4061
// / recipes to refer to the clones, and return it.
4061
4062
VPlan *duplicate ();
4062
4063
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.
4063
4067
VPBasicBlock *createVPBasicBlock (const Twine &Name,
4064
4068
VPRecipeBase *Recipe = nullptr ) {
4065
4069
auto *VPB = new VPBasicBlock (Name, Recipe);
4066
4070
CreatedBlocks.push_back (VPB);
4067
4071
return VPB;
4068
4072
}
4069
4073
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.
4070
4077
VPRegionBlock *createVPRegionBlock (VPBlockBase *Entry, VPBlockBase *Exiting,
4071
4078
const std::string &Name = " " ,
4072
4079
bool IsReplicator = false ) {
@@ -4075,6 +4082,10 @@ class VPlan {
4075
4082
return VPB;
4076
4083
}
4077
4084
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.
4078
4089
VPRegionBlock *createVPRegionBlock (const std::string &Name = " " ,
4079
4090
bool IsReplicator = false ) {
4080
4091
auto *VPB = new VPRegionBlock (Name, IsReplicator);
@@ -4084,6 +4095,8 @@ class VPlan {
4084
4095
4085
4096
// / Create a VPIRBasicBlock from \p IRBB containing VPIRInstructions for all
4086
4097
// / 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.
4087
4100
VPIRBasicBlock *createVPIRBasicBlock (BasicBlock *IRBB);
4088
4101
};
4089
4102
0 commit comments