From c44c04af4433382ebc76ab29566e4d17b121a692 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 1 Feb 2003 04:52:08 +0000 Subject: 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 --- llvm/lib/Analysis/DataStructure/Local.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Analysis/DataStructure/Local.cpp') 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 &Nodes; DSNodeHandle &RetNode; // Node that gets returned... - std::map &ScalarMap; + hash_map &ScalarMap; std::vector &FunctionCalls; public: GraphBuilder(DSGraph &g, std::vector &nodes, DSNodeHandle &retNode, - std::map &SM, + hash_map &SM, std::vector &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::iterator I = ScalarMap.find(CE); + hash_map::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::iterator I = DSInfo.begin(), + for (hash_map::iterator I = DSInfo.begin(), E = DSInfo.end(); I != E; ++I) delete I->second; -- cgit v1.2.3