aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/DataStructure/DataStructure.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-19 22:12:33 +0000
committerChris Lattner <sabre@nondot.org>2005-03-19 22:12:33 +0000
commited53fe9945e527570206d419e74e4561da3761cc (patch)
treefd861b238b851e9ce1c14ffd0133a34261bd40c6 /include/llvm/Analysis/DataStructure/DataStructure.h
parentce325fdb87b029cdc6fc21088e40648cfb68ce54 (diff)
Each DS collection now contains an equivalence class of globals values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/DataStructure/DataStructure.h')
-rw-r--r--include/llvm/Analysis/DataStructure/DataStructure.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/llvm/Analysis/DataStructure/DataStructure.h b/include/llvm/Analysis/DataStructure/DataStructure.h
index 1c2f4e654a..215c4a5409 100644
--- a/include/llvm/Analysis/DataStructure/DataStructure.h
+++ b/include/llvm/Analysis/DataStructure/DataStructure.h
@@ -18,11 +18,13 @@
#include "llvm/Target/TargetData.h"
#include "llvm/ADT/hash_map"
#include "llvm/ADT/hash_set"
+#include "llvm/ADT/EquivalenceClasses.h"
namespace llvm {
class Type;
class Instruction;
+class GlobalValue;
class DSGraph;
class DSNode;
class DSNodeHandle;
@@ -46,6 +48,10 @@ class LocalDataStructures : public ModulePass {
// DSInfo, one graph for each function
hash_map<Function*, DSGraph*> DSInfo;
DSGraph *GlobalsGraph;
+
+ /// GlobalECs - The equivalence classes for each global value that is merged
+ /// with other global values in the DSGraphs.
+ EquivalenceClasses<GlobalValue*> GlobalECs;
public:
~LocalDataStructures() { releaseMemory(); }
@@ -66,6 +72,8 @@ public:
DSGraph &getGlobalsGraph() const { return *GlobalsGraph; }
+ EquivalenceClasses<GlobalValue*> &getGlobalECs() { return GlobalECs; }
+
/// print - Print out the analysis results...
///
void print(std::ostream &O, const Module *M) const;
@@ -98,6 +106,10 @@ protected:
// This map is only maintained during construction of BU Graphs
std::map<std::vector<Function*>,
std::pair<DSGraph*, std::vector<DSNodeHandle> > > *IndCallGraphMap;
+
+ /// GlobalECs - The equivalence classes for each global value that is merged
+ /// with other global values in the DSGraphs.
+ EquivalenceClasses<GlobalValue*> GlobalECs;
public:
~BUDataStructures() { releaseMemory(); }
@@ -118,6 +130,9 @@ public:
DSGraph &getGlobalsGraph() const { return *GlobalsGraph; }
+ EquivalenceClasses<GlobalValue*> &getGlobalECs() { return GlobalECs; }
+
+
/// deleteValue/copyValue - Interfaces to update the DSGraphs in the program.
/// These correspond to the interfaces defined in the AliasAnalysis class.
void deleteValue(Value *V);
@@ -162,6 +177,10 @@ class TDDataStructures : public ModulePass {
hash_map<Function*, DSGraph*> DSInfo;
hash_set<Function*> ArgsRemainIncomplete;
DSGraph *GlobalsGraph;
+
+ /// GlobalECs - The equivalence classes for each global value that is merged
+ /// with other global values in the DSGraphs.
+ EquivalenceClasses<GlobalValue*> GlobalECs;
public:
~TDDataStructures() { releaseMyMemory(); }
@@ -181,6 +200,8 @@ public:
}
DSGraph &getGlobalsGraph() const { return *GlobalsGraph; }
+ EquivalenceClasses<GlobalValue*> &getGlobalECs() { return GlobalECs; }
+
/// deleteValue/copyValue - Interfaces to update the DSGraphs in the program.
/// These correspond to the interfaces defined in the AliasAnalysis class.