[llvm] r323505 - [SelectionDAG] Replace a std::vector<SDValue> with a SmallVector.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 25 23:15:22 PST 2018
Author: ctopper
Date: Thu Jan 25 23:15:22 2018
New Revision: 323505
URL: http://llvm.org/viewvc/llvm-project?rev=323505&view=rev
Log:
[SelectionDAG] Replace a std::vector<SDValue> with a SmallVector.
It likely the number of elements in the type we're legalizing here is reasonably small.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp?rev=323505&r1=323504&r2=323505&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp Thu Jan 25 23:15:22 2018
@@ -384,7 +384,7 @@ SDValue DAGTypeLegalizer::ExpandOp_BUILD
// Build a vector of twice the length out of the expanded elements.
// For example <3 x i64> -> <6 x i32>.
- std::vector<SDValue> NewElts;
+ SmallVector<SDValue, 16> NewElts;
NewElts.reserve(NumElts*2);
for (unsigned i = 0; i < NumElts; ++i) {
More information about the llvm-commits
mailing list