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 | dec628eead87b20773c98a00830580df211acc98 (patch) | |
tree | cb28286b21387a97519f3e30c757c4fa07b904c5 /lib/VMCore/BasicBlock.cpp | |
parent | fa48e9612e52adada82b3d74f9a8e2c35c960b36 (diff) |
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%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34193 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/BasicBlock.cpp')
-rw-r--r-- | lib/VMCore/BasicBlock.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp index afdd79e6aa..2e3b426e2b 100644 --- a/lib/VMCore/BasicBlock.cpp +++ b/lib/VMCore/BasicBlock.cpp @@ -62,7 +62,7 @@ template class SymbolTableListTraits<Instruction, BasicBlock, Function>; BasicBlock::BasicBlock(const std::string &Name, Function *Parent, BasicBlock *InsertBefore) - : Value(Type::LabelTy, Value::BasicBlockVal, Name) { + : Value(Type::LabelTy, Value::BasicBlockVal) { // Initialize the instlist... InstList.setItemParent(this); @@ -76,6 +76,8 @@ BasicBlock::BasicBlock(const std::string &Name, Function *Parent, } else if (Parent) { Parent->getBasicBlockList().push_back(this); } + + setName(Name); } |