diff options
author | Chris Lattner <sabre@nondot.org> | 2003-02-01 04:52:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-02-01 04:52:08 +0000 |
commit | c44c04af4433382ebc76ab29566e4d17b121a692 (patch) | |
tree | 4cc6de487139e3c4ff4a7ee987de356cb1e24e3c /llvm/lib/Analysis/DataStructure/Local.cpp | |
parent | 6c4005ccfe95ff2e3794fdb9ff2509c757af1307 (diff) | |
download | bcm5719-llvm-c44c04af4433382ebc76ab29566e4d17b121a692.tar.gz bcm5719-llvm-c44c04af4433382ebc76ab29566e4d17b121a692.zip |
Change DSGraph stuff to use hash_(set|map) instead of std::(set|map)
This change provides a small (3%) but consistent speedup
llvm-svn: 5460
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/Local.cpp')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/Local.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp index b6e468c87c3..3308fd195bb 100644 --- a/llvm/lib/Analysis/DataStructure/Local.cpp +++ b/llvm/lib/Analysis/DataStructure/Local.cpp @@ -56,12 +56,12 @@ namespace { DSGraph &G; std::vector<DSNode*> &Nodes; DSNodeHandle &RetNode; // Node that gets returned... - std::map<Value*, DSNodeHandle> &ScalarMap; + hash_map<Value*, DSNodeHandle> &ScalarMap; std::vector<DSCallSite> &FunctionCalls; public: GraphBuilder(DSGraph &g, std::vector<DSNode*> &nodes, DSNodeHandle &retNode, - std::map<Value*, DSNodeHandle> &SM, + hash_map<Value*, DSNodeHandle> &SM, std::vector<DSCallSite> &fc) : G(g), Nodes(nodes), RetNode(retNode), ScalarMap(SM), FunctionCalls(fc) { @@ -166,7 +166,7 @@ DSNodeHandle GraphBuilder::getValueDest(Value &Val) { return NH = getValueDest(*CE->getOperand(0)); if (CE->getOpcode() == Instruction::GetElementPtr) { visitGetElementPtrInst(*CE); - std::map<Value*, DSNodeHandle>::iterator I = ScalarMap.find(CE); + hash_map<Value*, DSNodeHandle>::iterator I = ScalarMap.find(CE); assert(I != ScalarMap.end() && "GEP didn't get processed right?"); return NH = I->second; } @@ -431,7 +431,7 @@ bool LocalDataStructures::run(Module &M) { // our memory... here... // void LocalDataStructures::releaseMemory() { - for (std::map<const Function*, DSGraph*>::iterator I = DSInfo.begin(), + for (hash_map<const Function*, DSGraph*>::iterator I = DSInfo.begin(), E = DSInfo.end(); I != E; ++I) delete I->second; |