aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/DataStructure/DSSupport.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/DSSupport.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/DSSupport.h')
-rw-r--r--include/llvm/Analysis/DataStructure/DSSupport.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/llvm/Analysis/DataStructure/DSSupport.h b/include/llvm/Analysis/DataStructure/DSSupport.h
index f0f261e0b9..06bcb5eaa9 100644
--- a/include/llvm/Analysis/DataStructure/DSSupport.h
+++ b/include/llvm/Analysis/DataStructure/DSSupport.h
@@ -8,10 +8,10 @@
#define LLVM_ANALYSIS_DSSUPPORT_H
#include <vector>
-#include <map>
-#include <set>
#include <functional>
#include <string>
+#include "Support/HashExtras.h"
+#include "Support/hash_set"
class Function;
class CallInst;
@@ -118,9 +118,9 @@ class DSCallSite {
Function *ResolvingCaller; // See comments above
static void InitNH(DSNodeHandle &NH, const DSNodeHandle &Src,
- const std::map<const DSNode*, DSNode*> &NodeMap) {
+ const hash_map<const DSNode*, DSNode*> &NodeMap) {
if (DSNode *N = Src.getNode()) {
- std::map<const DSNode*, DSNode*>::const_iterator I = NodeMap.find(N);
+ hash_map<const DSNode*, DSNode*>::const_iterator I = NodeMap.find(N);
assert(I != NodeMap.end() && "Not not in mapping!");
NH.setOffset(Src.getOffset());
@@ -129,9 +129,9 @@ class DSCallSite {
}
static void InitNH(DSNodeHandle &NH, const DSNodeHandle &Src,
- const std::map<const DSNode*, DSNodeHandle> &NodeMap) {
+ const hash_map<const DSNode*, DSNodeHandle> &NodeMap) {
if (DSNode *N = Src.getNode()) {
- std::map<const DSNode*, DSNodeHandle>::const_iterator I = NodeMap.find(N);
+ hash_map<const DSNode*, DSNodeHandle>::const_iterator I = NodeMap.find(N);
assert(I != NodeMap.end() && "Not not in mapping!");
NH.setOffset(Src.getOffset()+I->second.getOffset());
@@ -219,7 +219,7 @@ public:
/// DSNodes, marking any nodes which are reachable. All reachable nodes it
/// adds to the set, which allows it to only traverse visited nodes once.
///
- void markReachableNodes(std::set<DSNode*> &Nodes);
+ void markReachableNodes(hash_set<DSNode*> &Nodes);
bool operator<(const DSCallSite &CS) const {
if (Callee < CS.Callee) return true; // This must sort by callee first!