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
diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp
index 72237eb..fcbf73f 100644
--- a/llvm/lib/VMCore/Function.cpp
+++ b/llvm/lib/VMCore/Function.cpp
@@ -51,7 +51,7 @@
//===----------------------------------------------------------------------===//
Argument::Argument(const Type *Ty, const std::string &Name, Function *Par)
- : Value(Ty, Value::ArgumentVal, Name) {
+ : Value(Ty, Value::ArgumentVal) {
Parent = 0;
// Make sure that we get added to a function
@@ -59,6 +59,7 @@
if (Par)
Par->getArgumentList().push_back(this);
+ setName(Name);
}
void Argument::setParent(Function *parent) {