summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-04 16:31:42 +0000
committerChris Lattner <sabre@nondot.org>2002-02-04 16:31:42 +0000
commit4afa297e52f3fadfc270d565e178183c4fd316f5 (patch)
tree5e4160c4bc6268d34e44e01f9ae1b4dd28862372
parent7ad6519f90da236e97e58200b28244a976b968d3 (diff)
downloadbcm5719-llvm-4afa297e52f3fadfc270d565e178183c4fd316f5.tar.gz
bcm5719-llvm-4afa297e52f3fadfc270d565e178183c4fd316f5.zip
Use generic pointer hashes instead of custom ones.
llvm-svn: 1684
-rw-r--r--llvm/include/llvm/Analysis/LiveVar/LiveVarMap.h34
1 files changed, 6 insertions, 28 deletions
diff --git a/llvm/include/llvm/Analysis/LiveVar/LiveVarMap.h b/llvm/include/llvm/Analysis/LiveVar/LiveVarMap.h
index 44b3bbb7a41..a9e170170f9 100644
--- a/llvm/include/llvm/Analysis/LiveVar/LiveVarMap.h
+++ b/llvm/include/llvm/Analysis/LiveVar/LiveVarMap.h
@@ -1,4 +1,4 @@
-/* Title: LiveVarMap.h
+/* Title: LiveVarMap.h -*- C++ -*-
Author: Ruchira Sasanka
Date: Jun 30, 01
Purpose: This file contains the class for a map between the BasicBlock class
@@ -8,39 +8,17 @@
corresponding BasicBlock)
*/
-
#ifndef LIVE_VAR_MAP_H
#define LIVE_VAR_MAP_H
-#include <ext/hash_map>
+#include "Support/HashExtras.h"
+class MachineInstr;
class BasicBlock;
class BBLiveVar;
+class LiveVarSet;
-
-struct hashFuncMInst { // sturcture containing the hash function for MInst
- inline size_t operator () (const MachineInstr *val) const {
- return (size_t) val;
- }
-};
-
-
-struct hashFuncBB { // sturcture containing the hash function for BB
- inline size_t operator () (const BasicBlock *val) const {
- return (size_t) val;
- }
-};
-
-
-
-
-typedef std::hash_map<const BasicBlock *,
- BBLiveVar *, hashFuncBB > BBToBBLiveVarMapType;
-
-typedef std::hash_map<const MachineInstr *, const LiveVarSet *,
- hashFuncMInst> MInstToLiveVarSetMapType;
-
+typedef std::hash_map<const BasicBlock *, BBLiveVar *> BBToBBLiveVarMapType;
+typedef std::hash_map<const MachineInstr *, const LiveVarSet *> MInstToLiveVarSetMapType;
#endif
-
-
OpenPOWER on IntegriCloud