[llvm] [VPlan] Migrate VPBuilder to VPInsertPt fully (NFC) (PR #209764)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 30 05:35:45 PDT 2026
================
@@ -97,13 +97,52 @@ void reportVectorization(OptimizationRemarkEmitter *ORE, Loop *TheLoop,
/// VPlan-based builder utility analogous to IRBuilder.
class VPBuilder {
- VPBasicBlock *BB = nullptr;
- VPBasicBlock::iterator InsertPt = VPBasicBlock::iterator();
+public:
+ /// InsertPoint - A saved insertion point.
+ class VPInsertPoint {
----------------
lukel97 wrote:
I'm not sure I understand the motivation behind this. It doesn't simplify any of the call sites and it ends up exposing what was previously an implementation details.
IRBuilder just uses BasicBlocks and BasicBlock::iterators in the constructor:
```c++
IRBuilder(BasicBlock *TheBB, BasicBlock::iterator IP, FolderTy Folder,
MDNode *FPMathTag = nullptr,
ArrayRef<OperandBundleDef> OpBundles = {})
```
https://github.com/llvm/llvm-project/pull/209764
More information about the llvm-commits
mailing list