[llvm-branch-commits] [llvm-branch] r134463 - /llvm/branches/type-system-rewrite/lib/Transforms/Utils/ValueMapper.cpp
Chris Lattner
sabre at nondot.org
Tue Jul 5 22:07:07 PDT 2011
Author: lattner
Date: Wed Jul 6 00:07:07 2011
New Revision: 134463
URL: http://llvm.org/viewvc/llvm-project?rev=134463&view=rev
Log:
prune #includes, switch to SmallVEctor from vector for temporary operand list of constantexprs.
Modified:
llvm/branches/type-system-rewrite/lib/Transforms/Utils/ValueMapper.cpp
Modified: llvm/branches/type-system-rewrite/lib/Transforms/Utils/ValueMapper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/type-system-rewrite/lib/Transforms/Utils/ValueMapper.cpp?rev=134463&r1=134462&r2=134463&view=diff
==============================================================================
--- llvm/branches/type-system-rewrite/lib/Transforms/Utils/ValueMapper.cpp (original)
+++ llvm/branches/type-system-rewrite/lib/Transforms/Utils/ValueMapper.cpp Wed Jul 6 00:07:07 2011
@@ -13,16 +13,13 @@
//===----------------------------------------------------------------------===//
#include "llvm/Transforms/Utils/ValueMapper.h"
-#include "llvm/Type.h"
#include "llvm/Constants.h"
#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/Metadata.h"
-#include "llvm/ADT/SmallVector.h"
using namespace llvm;
-Value *llvm::MapValue(const Value *V, ValueToValueMapTy &VM,
- RemapFlags Flags) {
+Value *llvm::MapValue(const Value *V, ValueToValueMapTy &VM, RemapFlags Flags) {
ValueToValueMapTy::iterator I = VM.find(V);
// If the value already exists in the map, use it.
@@ -89,7 +86,7 @@
// Okay, the operands don't all match. We've already processed some or all
// of the operands, set them up now.
- std::vector<Constant*> Ops;
+ SmallVector<Constant*, 8> Ops;
Ops.reserve(C->getNumOperands());
for (unsigned j = 0; j != i; ++j)
Ops.push_back(cast<Constant>(C->getOperand(i)));
More information about the llvm-branch-commits
mailing list