[llvm] [VPlan] Make VPBuilder APIs uniformly take ArrayRef (NFC) (PR #151484)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 31 03:00:28 PDT 2025


https://github.com/artagnon created https://github.com/llvm/llvm-project/pull/151484

None

>From 7f5595a182a6cd438662d192d85e2cf735727f96 Mon Sep 17 00:00:00 2001
From: Ramkumar Ramachandra <ramkumar.ramachandra at codasip.com>
Date: Thu, 31 Jul 2025 10:57:30 +0100
Subject: [PATCH] [VPlan] Make VPBuilder APIs uniformly take ArrayRef (NFC)

---
 llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
index f57ce0c3ccb4d..ea0fa0668ef6b 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
@@ -170,8 +170,7 @@ class VPBuilder {
         new VPInstruction(Opcode, Operands, Flags, DL, Name));
   }
 
-  VPInstruction *createNaryOp(unsigned Opcode,
-                              std::initializer_list<VPValue *> Operands,
+  VPInstruction *createNaryOp(unsigned Opcode, ArrayRef<VPValue *> Operands,
                               Type *ResultTy, const VPIRFlags &Flags = {},
                               DebugLoc DL = DebugLoc::getUnknown(),
                               const Twine &Name = "") {
@@ -180,7 +179,7 @@ class VPBuilder {
   }
 
   VPInstruction *createOverflowingOp(unsigned Opcode,
-                                     std::initializer_list<VPValue *> Operands,
+                                     ArrayRef<VPValue *> Operands,
                                      VPRecipeWithIRFlags::WrapFlagsTy WrapFlags,
                                      DebugLoc DL = DebugLoc::getUnknown(),
                                      const Twine &Name = "") {



More information about the llvm-commits mailing list