[llvm] bb64fd5 - [SelectionDAGBuilder] Use SmallVectorImpl& for function arguments. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 3 14:11:09 PDT 2023
Author: Craig Topper
Date: 2023-04-03T14:03:05-07:00
New Revision: bb64fd571bce276e89d597ff9992cf2128afc67c
URL: https://github.com/llvm/llvm-project/commit/bb64fd571bce276e89d597ff9992cf2128afc67c
DIFF: https://github.com/llvm/llvm-project/commit/bb64fd571bce276e89d597ff9992cf2128afc67c.diff
LOG: [SelectionDAGBuilder] Use SmallVectorImpl& for function arguments. NFC
Make the reference const since we aren't modifying the vectors.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 14d1d0259aaeb..bb9cc4097e051 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -7494,8 +7494,9 @@ static unsigned getISDForVPIntrinsic(const VPIntrinsic &VPIntrin) {
return *ResOPC;
}
-void SelectionDAGBuilder::visitVPLoad(const VPIntrinsic &VPIntrin, EVT VT,
- SmallVector<SDValue, 7> &OpValues) {
+void SelectionDAGBuilder::visitVPLoad(
+ const VPIntrinsic &VPIntrin, EVT VT,
+ const SmallVectorImpl<SDValue> &OpValues) {
SDLoc DL = getCurSDLoc();
Value *PtrOperand = VPIntrin.getArgOperand(0);
MaybeAlign Alignment = VPIntrin.getPointerAlignment();
@@ -7520,8 +7521,9 @@ void SelectionDAGBuilder::visitVPLoad(const VPIntrinsic &VPIntrin, EVT VT,
setValue(&VPIntrin, LD);
}
-void SelectionDAGBuilder::visitVPGather(const VPIntrinsic &VPIntrin, EVT VT,
- SmallVector<SDValue, 7> &OpValues) {
+void SelectionDAGBuilder::visitVPGather(
+ const VPIntrinsic &VPIntrin, EVT VT,
+ const SmallVectorImpl<SDValue> &OpValues) {
SDLoc DL = getCurSDLoc();
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
Value *PtrOperand = VPIntrin.getArgOperand(0);
@@ -7561,8 +7563,8 @@ void SelectionDAGBuilder::visitVPGather(const VPIntrinsic &VPIntrin, EVT VT,
setValue(&VPIntrin, LD);
}
-void SelectionDAGBuilder::visitVPStore(const VPIntrinsic &VPIntrin,
- SmallVector<SDValue, 7> &OpValues) {
+void SelectionDAGBuilder::visitVPStore(
+ const VPIntrinsic &VPIntrin, const SmallVectorImpl<SDValue> &OpValues) {
SDLoc DL = getCurSDLoc();
Value *PtrOperand = VPIntrin.getArgOperand(1);
EVT VT = OpValues[0].getValueType();
@@ -7583,8 +7585,8 @@ void SelectionDAGBuilder::visitVPStore(const VPIntrinsic &VPIntrin,
setValue(&VPIntrin, ST);
}
-void SelectionDAGBuilder::visitVPScatter(const VPIntrinsic &VPIntrin,
- SmallVector<SDValue, 7> &OpValues) {
+void SelectionDAGBuilder::visitVPScatter(
+ const VPIntrinsic &VPIntrin, const SmallVectorImpl<SDValue> &OpValues) {
SDLoc DL = getCurSDLoc();
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
Value *PtrOperand = VPIntrin.getArgOperand(1);
@@ -7626,7 +7628,8 @@ void SelectionDAGBuilder::visitVPScatter(const VPIntrinsic &VPIntrin,
}
void SelectionDAGBuilder::visitVPStridedLoad(
- const VPIntrinsic &VPIntrin, EVT VT, SmallVectorImpl<SDValue> &OpValues) {
+ const VPIntrinsic &VPIntrin, EVT VT,
+ const SmallVectorImpl<SDValue> &OpValues) {
SDLoc DL = getCurSDLoc();
Value *PtrOperand = VPIntrin.getArgOperand(0);
MaybeAlign Alignment = VPIntrin.getPointerAlignment();
@@ -7651,7 +7654,7 @@ void SelectionDAGBuilder::visitVPStridedLoad(
}
void SelectionDAGBuilder::visitVPStridedStore(
- const VPIntrinsic &VPIntrin, SmallVectorImpl<SDValue> &OpValues) {
+ const VPIntrinsic &VPIntrin, const SmallVectorImpl<SDValue> &OpValues) {
SDLoc DL = getCurSDLoc();
Value *PtrOperand = VPIntrin.getArgOperand(1);
EVT VT = OpValues[0].getValueType();
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
index 6e92f6abf0277..5166448974144 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
@@ -625,17 +625,17 @@ class SelectionDAGBuilder {
void visitTargetIntrinsic(const CallInst &I, unsigned Intrinsic);
void visitConstrainedFPIntrinsic(const ConstrainedFPIntrinsic &FPI);
void visitVPLoad(const VPIntrinsic &VPIntrin, EVT VT,
- SmallVector<SDValue, 7> &OpValues);
+ const SmallVectorImpl<SDValue> &OpValues);
void visitVPStore(const VPIntrinsic &VPIntrin,
- SmallVector<SDValue, 7> &OpValues);
+ const SmallVectorImpl<SDValue> &OpValues);
void visitVPGather(const VPIntrinsic &VPIntrin, EVT VT,
- SmallVector<SDValue, 7> &OpValues);
+ const SmallVectorImpl<SDValue> &OpValues);
void visitVPScatter(const VPIntrinsic &VPIntrin,
- SmallVector<SDValue, 7> &OpValues);
+ const SmallVectorImpl<SDValue> &OpValues);
void visitVPStridedLoad(const VPIntrinsic &VPIntrin, EVT VT,
- SmallVectorImpl<SDValue> &OpValues);
+ const SmallVectorImpl<SDValue> &OpValues);
void visitVPStridedStore(const VPIntrinsic &VPIntrin,
- SmallVectorImpl<SDValue> &OpValues);
+ const SmallVectorImpl<SDValue> &OpValues);
void visitVPCmp(const VPCmpIntrinsic &VPIntrin);
void visitVectorPredicationIntrinsic(const VPIntrinsic &VPIntrin);
More information about the llvm-commits
mailing list