diff options
author | Chris Lattner <sabre@nondot.org> | 2007-02-12 05:18:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-02-12 05:18:08 +0000 |
commit | 32ab643df77e9993639eb9bc8c29dc5fe51c2917 (patch) | |
tree | b4d082800fe5a903fa35b8877aa153833d98b622 /llvm/lib/VMCore/Instruction.cpp | |
parent | e976307ba9b75b8df085623aae44d7bb57ffaca3 (diff) | |
download | bcm5719-llvm-32ab643df77e9993639eb9bc8c29dc5fe51c2917.tar.gz bcm5719-llvm-32ab643df77e9993639eb9bc8c29dc5fe51c2917.zip |
Switch ValueSymbolTable to use StringMap<Value*> instead of std::map<std::string, Value*>
as its main datastructure. There are many improvements yet to be made, but
this speeds up opt --std-compile-opts on 447.dealII by 7.3%.
llvm-svn: 34193
Diffstat (limited to 'llvm/lib/VMCore/Instruction.cpp')
-rw-r--r-- | llvm/lib/VMCore/Instruction.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Instruction.cpp b/llvm/lib/VMCore/Instruction.cpp index 6b2babaeccb..d4c44741e5c 100644 --- a/llvm/lib/VMCore/Instruction.cpp +++ b/llvm/lib/VMCore/Instruction.cpp @@ -19,7 +19,7 @@ using namespace llvm; Instruction::Instruction(const Type *ty, unsigned it, Use *Ops, unsigned NumOps, const std::string &Name, Instruction *InsertBefore) - : User(ty, Value::InstructionVal + it, Ops, NumOps, Name), Parent(0) { + : User(ty, Value::InstructionVal + it, Ops, NumOps), Parent(0) { // Make sure that we get added to a basicblock LeakDetector::addGarbageObject(this); @@ -29,17 +29,19 @@ Instruction::Instruction(const Type *ty, unsigned it, Use *Ops, unsigned NumOps, "Instruction to insert before is not in a basic block!"); InsertBefore->getParent()->getInstList().insert(InsertBefore, this); } + setName(Name); } Instruction::Instruction(const Type *ty, unsigned it, Use *Ops, unsigned NumOps, const std::string &Name, BasicBlock *InsertAtEnd) - : User(ty, Value::InstructionVal + it, Ops, NumOps, Name), Parent(0) { + : User(ty, Value::InstructionVal + it, Ops, NumOps), Parent(0) { // Make sure that we get added to a basicblock LeakDetector::addGarbageObject(this); // append this instruction into the basic block assert(InsertAtEnd && "Basic block to append to may not be NULL!"); InsertAtEnd->getInstList().push_back(this); + setName(Name); } // Out of line virtual method, so the vtable, etc has a home. |