[llvm-commits] CVS: llvm/lib/Analysis/IPA/IPModRef.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Jan 31 22:53:07 PST 2003


Changes in directory llvm/lib/Analysis/IPA:

IPModRef.cpp updated: 1.12 -> 1.13

---
Log message:

Change DSGraph stuff to use hash_(set|map) instead of std::(set|map)
This change provides a small (3%) but consistent speedup


---
Diffs of the changes:

Index: llvm/lib/Analysis/IPA/IPModRef.cpp
diff -u llvm/lib/Analysis/IPA/IPModRef.cpp:1.12 llvm/lib/Analysis/IPA/IPModRef.cpp:1.13
--- llvm/lib/Analysis/IPA/IPModRef.cpp:1.12	Thu Jan 23 16:06:33 2003
+++ llvm/lib/Analysis/IPA/IPModRef.cpp	Fri Jan 31 22:51:57 2003
@@ -118,7 +118,7 @@
 //       function or we cannot determine the complete set of functions invoked).
 //
 DSGraph* FunctionModRefInfo::ResolveCallSiteModRefInfo(CallInst &CI,
-                               std::map<const DSNode*, DSNodeHandle> &NodeMap)
+                               hash_map<const DSNode*, DSNodeHandle> &NodeMap)
 {
   // Step #0: Quick check if we are going to fail anyway: avoid
   // all the graph cloning and map copying in steps #1 and #2.
@@ -194,7 +194,7 @@
   callSiteModRefInfo[&callInst] = callModRefInfo;
 
   // Get a copy of the graph for the callee with the callee inlined
-  std::map<const DSNode*, DSNodeHandle> NodeMap;
+  hash_map<const DSNode*, DSNodeHandle> NodeMap;
   DSGraph* csgp = ResolveCallSiteModRefInfo(const_cast<CallInst&>(callInst),
                                             NodeMap);
   if (!csgp)
@@ -238,7 +238,7 @@
     knownValues.resize(tdGraph.getGraphSize());
 
     // For every identifiable value, save Value pointer in knownValues[i]
-    for (std::map<Value*, DSNodeHandle>::const_iterator
+    for (hash_map<Value*, DSNodeHandle>::const_iterator
            I = tdGraph.getScalarMap().begin(),
            E = tdGraph.getScalarMap().end(); I != E; ++I)
       if (isa<GlobalValue>(I->first) ||





More information about the llvm-commits mailing list