summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-13 06:01:22 +0000
committerChris Lattner <sabre@nondot.org>2007-02-13 06:01:22 +0000
commit6ea07f178c64a74967b9f61b657c1c070286694f (patch)
treed7d82be244b44e1a4ac5e822bc6acd5cdc729c6a /llvm/lib/CodeGen
parentade1c2bb513bb7fc6ae85a2ddfd174a919a6e2b2 (diff)
downloadbcm5719-llvm-6ea07f178c64a74967b9f61b657c1c070286694f.tar.gz
bcm5719-llvm-6ea07f178c64a74967b9f61b657c1c070286694f.zip
eliminate vector-related allocations
llvm-svn: 34223
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/IntrinsicLowering.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/IntrinsicLowering.cpp b/llvm/lib/CodeGen/IntrinsicLowering.cpp
index 51879daa7c7..35e20e3c694 100644
--- a/llvm/lib/CodeGen/IntrinsicLowering.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud