Changes in directory llvm/lib/Transforms/Scalar:
SCCP.cpp updated: 1.153 -> 1.154 --- Log message: use smallvector instead of vector to make constant folding a bit more efficient --- Diffs of the changes: (+3 -2) SCCP.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms/Scalar/SCCP.cpp diff -u llvm/lib/Transforms/Scalar/SCCP.cpp:1.153 llvm/lib/Transforms/Scalar/SCCP.cpp:1.154 --- llvm/lib/Transforms/Scalar/SCCP.cpp:1.153 Tue Jan 30 14:08:38 2007 +++ llvm/lib/Transforms/Scalar/SCCP.cpp Tue Jan 30 17:15:19 2007 @@ -33,6 +33,7 @@ #include "llvm/Support/CallSite.h" #include "llvm/Support/Debug.h" #include "llvm/ADT/hash_map" +#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" #include <algorithm> @@ -1093,7 +1094,7 @@ return; } - std::vector<Constant*> Operands; + SmallVector<Constant*, 8> Operands; Operands.reserve(I->getNumOperands()-1); for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); @@ -1109,7 +1110,7 @@ Operands.push_back(State.getConstant()); } - if (Constant *C = ConstantFoldCall(F, Operands)) + if (Constant *C = ConstantFoldCall(F, &Operands[0], Operands.size())) markConstant(IV, I, C); else markOverdefined(IV, I); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits