summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/BasicBlock.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-12 05:18:08 +0000
committerChris Lattner <sabre@nondot.org>2007-02-12 05:18:08 +0000
commit32ab643df77e9993639eb9bc8c29dc5fe51c2917 (patch)
treeb4d082800fe5a903fa35b8877aa153833d98b622 /llvm/lib/VMCore/BasicBlock.cpp
parente976307ba9b75b8df085623aae44d7bb57ffaca3 (diff)
downloadbcm5719-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/BasicBlock.cpp')
-rw-r--r--llvm/lib/VMCore/BasicBlock.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/BasicBlock.cpp b/llvm/lib/VMCore/BasicBlock.cpp
index afdd79e6aa4..2e3b426e2b2 100644
--- a/llvm/lib/VMCore/BasicBlock.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud