[llvm] [VPlan] Migrate VPBuilder to VPInsertPt fully (NFC) (PR #209764)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 30 06:30:17 PDT 2026
================
@@ -117,87 +154,40 @@ class VPBuilder {
public:
VPlan &getPlan() const {
- assert(getInsertBlock() && "Insert block must be set");
- return *getInsertBlock()->getPlan();
+ assert(InsertPt && "Insert block must be set");
+ return *InsertPt.getBlock()->getPlan();
}
VPBuilder() = default;
- VPBuilder(VPBasicBlock *InsertBB) { setInsertPoint(InsertBB); }
- VPBuilder(VPRecipeBase *InsertPt) { setInsertPoint(InsertPt); }
- VPBuilder(VPBasicBlock *TheBB, VPBasicBlock::iterator IP) {
- setInsertPoint(TheBB, IP);
- }
-
- /// Clear the insertion point: created instructions will not be inserted into
- /// a block.
- void clearInsertionPoint() {
- BB = nullptr;
- InsertPt = VPBasicBlock::iterator();
- }
+ VPBuilder(const VPInsertPoint &IP) : InsertPt(IP) {}
----------------
lukel97 wrote:
Out of curiosity how does this work? We have a public constructor that takes a private class?
https://github.com/llvm/llvm-project/pull/209764
More information about the llvm-commits
mailing list