diff options
author | Chris Lattner <sabre@nondot.org> | 2007-02-13 06:01:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-02-13 06:01:22 +0000 |
commit | 990b849abc9481b8c7a482019cd0d95fe2f2a3ea (patch) | |
tree | a287172654b3240304a4676da62fdb730462e0f0 /lib/CodeGen/IntrinsicLowering.cpp | |
parent | c18470cb0044129f1b43d09d7a4eb683ee3996ad (diff) |
eliminate vector-related allocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34223 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/IntrinsicLowering.cpp')
-rw-r--r-- | lib/CodeGen/IntrinsicLowering.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/IntrinsicLowering.cpp b/lib/CodeGen/IntrinsicLowering.cpp index 51879daa7c..35e20e3c69 100644 --- a/lib/CodeGen/IntrinsicLowering.cpp +++ b/lib/CodeGen/IntrinsicLowering.cpp @@ -19,6 +19,7 @@ #include "llvm/CodeGen/IntrinsicLowering.h" #include "llvm/Support/Streams.h" #include "llvm/Target/TargetData.h" +#include "llvm/ADT/SmallVector.h" using namespace llvm; template <class ArgIt> @@ -52,8 +53,9 @@ static CallInst *ReplaceCallWith(const char *NewFn, CallInst *CI, FunctionType::get(RetTy, ParamTys, false)); } - std::vector<Value*> Operands(ArgBegin, ArgEnd); - CallInst *NewCI = new CallInst(FCache, Operands, CI->getName(), CI); + SmallVector<Value*, 8> Operands(ArgBegin, ArgEnd); + CallInst *NewCI = new CallInst(FCache, &Operands[0], Operands.size(), + CI->getName(), CI); if (!CI->use_empty()) CI->replaceAllUsesWith(NewCI); return NewCI; |