aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/DataStructure/DSGraph.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-02-01 04:52:08 +0000
committerChris Lattner <sabre@nondot.org>2003-02-01 04:52:08 +0000
commit41c04f730b4fdce98b35603d1b02a1dc6b81e589 (patch)
treef08dfc8ff8348bc104ab699169d52d3673e55c6e /include/llvm/Analysis/DataStructure/DSGraph.h
parentcbf2a3e5c1a88106c0085885772343bc9ee6b9c1 (diff)
Change DSGraph stuff to use hash_(set|map) instead of std::(set|map)
This change provides a small (3%) but consistent speedup git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5460 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/DataStructure/DSGraph.h')
-rw-r--r--include/llvm/Analysis/DataStructure/DSGraph.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/llvm/Analysis/DataStructure/DSGraph.h b/include/llvm/Analysis/DataStructure/DSGraph.h
index 8e11dc010a..daab1195b3 100644
--- a/include/llvm/Analysis/DataStructure/DSGraph.h
+++ b/include/llvm/Analysis/DataStructure/DSGraph.h
@@ -19,7 +19,7 @@ class DSGraph {
DSNodeHandle RetNode; // The node that gets returned...
std::vector<DSNode*> Nodes;
- std::map<Value*, DSNodeHandle> ScalarMap;
+ hash_map<Value*, DSNodeHandle> ScalarMap;
// FunctionCalls - This vector maintains a single entry for each call
// instruction in the current graph. The first entry in the vector is the
@@ -49,7 +49,7 @@ public:
// method.
//
DSGraph(const DSGraph &DSG);
- DSGraph(const DSGraph &DSG, std::map<const DSNode*, DSNodeHandle> &NodeMap);
+ DSGraph(const DSGraph &DSG, hash_map<const DSNode*, DSNodeHandle> &NodeMap);
~DSGraph();
bool hasFunction() const { return Func != 0; }
@@ -76,8 +76,8 @@ public:
/// getScalarMap - Get a map that describes what the nodes the scalars in this
/// function point to...
///
- std::map<Value*, DSNodeHandle> &getScalarMap() { return ScalarMap; }
- const std::map<Value*, DSNodeHandle> &getScalarMap() const {return ScalarMap;}
+ hash_map<Value*, DSNodeHandle> &getScalarMap() { return ScalarMap; }
+ const hash_map<Value*, DSNodeHandle> &getScalarMap() const {return ScalarMap;}
/// getFunctionCalls - Return the list of call sites in the original local
/// graph...
@@ -102,7 +102,7 @@ public:
DSNodeHandle &getNodeForValue(Value *V) { return ScalarMap[V]; }
const DSNodeHandle &getNodeForValue(Value *V) const {
- std::map<Value*, DSNodeHandle>::const_iterator I = ScalarMap.find(V);
+ hash_map<Value*, DSNodeHandle>::const_iterator I = ScalarMap.find(V);
assert(I != ScalarMap.end() &&
"Use non-const lookup function if node may not be in the map");
return I->second;
@@ -168,8 +168,8 @@ public:
// being cloned.
//
DSNodeHandle cloneInto(const DSGraph &G,
- std::map<Value*, DSNodeHandle> &OldValMap,
- std::map<const DSNode*, DSNodeHandle> &OldNodeMap,
+ hash_map<Value*, DSNodeHandle> &OldValMap,
+ hash_map<const DSNode*, DSNodeHandle> &OldNodeMap,
unsigned CloneFlags = 0);
/// mergeInGraph - The method is used for merging graphs together. If the