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/Verifier.cpp | |
parent | fa48e9612e52adada82b3d74f9a8e2c35c960b36 (diff) | |
download | external_llvm-dec628eead87b20773c98a00830580df211acc98.zip external_llvm-dec628eead87b20773c98a00830580df211acc98.tar.gz external_llvm-dec628eead87b20773c98a00830580df211acc98.tar.bz2 |
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/Verifier.cpp')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 5488131..91dd4198 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -51,7 +51,6 @@ #include "llvm/Instructions.h" #include "llvm/Intrinsics.h" #include "llvm/PassManager.h" -#include "llvm/ValueSymbolTable.h" #include "llvm/Analysis/Dominators.h" #include "llvm/Support/CFG.h" #include "llvm/Support/InstVisitor.h" @@ -102,7 +101,6 @@ namespace { // Anonymous namespace for class bool doInitialization(Module &M) { Mod = &M; verifyTypeSymbolTable(M.getTypeSymbolTable()); - verifyValueSymbolTable(M.getValueSymbolTable()); // If this is a real pass, in a pass manager, we must abort before // returning back to the pass manager, or else the pass manager may try to @@ -177,7 +175,6 @@ namespace { // Anonymous namespace for class // Verification methods... void verifyTypeSymbolTable(TypeSymbolTable &ST); - void verifyValueSymbolTable(ValueSymbolTable &ST); void visitGlobalValue(GlobalValue &GV); void visitGlobalVariable(GlobalVariable &GV); void visitFunction(Function &F); @@ -307,22 +304,6 @@ void Verifier::visitGlobalVariable(GlobalVariable &GV) { void Verifier::verifyTypeSymbolTable(TypeSymbolTable &ST) { } -// verifySymbolTable - Verify that a function or module symbol table is ok -// -void Verifier::verifyValueSymbolTable(ValueSymbolTable &ST) { - - // Loop over all of the values in the symbol table. - for (ValueSymbolTable::const_iterator VI = ST.begin(), VE = ST.end(); - VI != VE; ++VI) { - Value *V = VI->second; - // Check that there are no void typed values in the symbol table. Values - // with a void type cannot be put into symbol tables because they cannot - // have names! - Assert1(V->getType() != Type::VoidTy, - "Values with void type are not allowed to have names!", V); - } -} - // visitFunction - Verify that a function is ok. // void Verifier::visitFunction(Function &F) { @@ -375,8 +356,6 @@ void Verifier::visitFunction(Function &F) { Assert1(F.getName().substr(0, 5) != "llvm.", "llvm intrinsics cannot be defined!", &F); - verifyValueSymbolTable(F.getValueSymbolTable()); - // Check the entry node BasicBlock *Entry = &F.getEntryBlock(); Assert1(pred_begin(Entry) == pred_end(Entry), |