[llvm] r207330 - Replace std::vector with SmallVector for some small, known size vectors.
Craig Topper
craig.topper at gmail.com
Sat Apr 26 12:29:48 PDT 2014
Author: ctopper
Date: Sat Apr 26 14:29:47 2014
New Revision: 207330
URL: http://llvm.org/viewvc/llvm-project?rev=207330&view=rev
Log:
Replace std::vector with SmallVector for some small, known size vectors.
Modified:
llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.cpp
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.cpp?rev=207330&r1=207329&r2=207330&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.cpp Sat Apr 26 14:29:47 2014
@@ -1070,7 +1070,7 @@ SDValue NVPTXTargetLowering::LowerCall(T
if (NumElts == 1) {
// Just a simple load
- std::vector<EVT> LoadRetVTs;
+ SmallVector<EVT, 4> LoadRetVTs;
if (needTruncate) {
// If loading i1 result, generate
// load i16
@@ -1080,7 +1080,7 @@ SDValue NVPTXTargetLowering::LowerCall(T
LoadRetVTs.push_back(EltVT);
LoadRetVTs.push_back(MVT::Other);
LoadRetVTs.push_back(MVT::Glue);
- std::vector<SDValue> LoadRetOps;
+ SmallVector<SDValue, 4> LoadRetOps;
LoadRetOps.push_back(Chain);
LoadRetOps.push_back(DAG.getConstant(1, MVT::i32));
LoadRetOps.push_back(DAG.getConstant(0, MVT::i32));
@@ -1096,7 +1096,7 @@ SDValue NVPTXTargetLowering::LowerCall(T
InVals.push_back(Ret0);
} else if (NumElts == 2) {
// LoadV2
- std::vector<EVT> LoadRetVTs;
+ SmallVector<EVT, 4> LoadRetVTs;
if (needTruncate) {
// If loading i1 result, generate
// load i16
@@ -1109,7 +1109,7 @@ SDValue NVPTXTargetLowering::LowerCall(T
}
LoadRetVTs.push_back(MVT::Other);
LoadRetVTs.push_back(MVT::Glue);
- std::vector<SDValue> LoadRetOps;
+ SmallVector<SDValue, 4> LoadRetOps;
LoadRetOps.push_back(Chain);
LoadRetOps.push_back(DAG.getConstant(1, MVT::i32));
LoadRetOps.push_back(DAG.getConstant(0, MVT::i32));
More information about the llvm-commits
mailing list