aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/LiveVar
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Analysis/LiveVar')
-rw-r--r--include/llvm/Analysis/LiveVar/LiveVarMap.h10
-rw-r--r--include/llvm/Analysis/LiveVar/LiveVarSet.h2
-rw-r--r--include/llvm/Analysis/LiveVar/ValueSet.h29
3 files changed, 11 insertions, 30 deletions
diff --git a/include/llvm/Analysis/LiveVar/LiveVarMap.h b/include/llvm/Analysis/LiveVar/LiveVarMap.h
index bc00d4f..44b3bbb 100644
--- a/include/llvm/Analysis/LiveVar/LiveVarMap.h
+++ b/include/llvm/Analysis/LiveVar/LiveVarMap.h
@@ -12,7 +12,7 @@
#ifndef LIVE_VAR_MAP_H
#define LIVE_VAR_MAP_H
-#include <hash_map>
+#include <ext/hash_map>
class BasicBlock;
class BBLiveVar;
@@ -34,11 +34,11 @@ struct hashFuncBB { // sturcture containing the hash function for BB
-typedef hash_map<const BasicBlock *,
- BBLiveVar *, hashFuncBB > BBToBBLiveVarMapType;
+typedef std::hash_map<const BasicBlock *,
+ BBLiveVar *, hashFuncBB > BBToBBLiveVarMapType;
-typedef hash_map<const MachineInstr *, const LiveVarSet *,
- hashFuncMInst> MInstToLiveVarSetMapType;
+typedef std::hash_map<const MachineInstr *, const LiveVarSet *,
+ hashFuncMInst> MInstToLiveVarSetMapType;
#endif
diff --git a/include/llvm/Analysis/LiveVar/LiveVarSet.h b/include/llvm/Analysis/LiveVar/LiveVarSet.h
index 17524fc..d7761cf 100644
--- a/include/llvm/Analysis/LiveVar/LiveVarSet.h
+++ b/include/llvm/Analysis/LiveVar/LiveVarSet.h
@@ -8,7 +8,7 @@
#ifndef LIVE_VAR_SET_H
#define LIVE_VAR_SET_H
-#include "ValueSet.h"
+#include "llvm/Analysis/LiveVar/ValueSet.h"
#include "llvm/Instruction.h"
#include "llvm/Type.h"
diff --git a/include/llvm/Analysis/LiveVar/ValueSet.h b/include/llvm/Analysis/LiveVar/ValueSet.h
index ee6aa15..d17e022 100644
--- a/include/llvm/Analysis/LiveVar/ValueSet.h
+++ b/include/llvm/Analysis/LiveVar/ValueSet.h
@@ -1,4 +1,4 @@
-/* Title: ValueSet.h
+/* Title: ValueSet.h -*- C++ -*-
Author: Ruchira Sasanka
Date: Jun 30, 01
Purpose: Contains a mathematical set of Values. LiveVarSet is derived from
@@ -8,24 +8,9 @@
#ifndef VALUE_SET_H
#define VALUE_SET_H
-#include <stdlib.h>
-
-#include <hash_set>
-#include <algorithm>
-//#include <fstream>
-#include <iostream>
-
-#include "llvm/Value.h"
-
-
-//------------------------ Support functions ---------------------------------
-
-struct hashFuncValue { // sturcture containing the hash func
- inline size_t operator () (const Value *const val) const
- { return (size_t) val; }
-};
-
-
+class Value;
+#include "Support/HashExtras.h"
+#include <ext/hash_set>
//------------------- Class Definition for ValueSet --------------------------
@@ -33,12 +18,8 @@ void printValue( const Value *const v); // func to print a Value
-class ValueSet : public hash_set<const Value *, hashFuncValue >
-{
-
+class ValueSet : public std::hash_set<const Value *> {
public:
- ValueSet(); // constructor
-
inline void add(const Value *const val)
{ assert( val ); insert(val);} // for adding a live variable to set