aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Analysis/DataStructure.h20
-rw-r--r--include/llvm/Analysis/DataStructure/DataStructure.h20
2 files changed, 34 insertions, 6 deletions
diff --git a/include/llvm/Analysis/DataStructure.h b/include/llvm/Analysis/DataStructure.h
index 5132208..6a04827 100644
--- a/include/llvm/Analysis/DataStructure.h
+++ b/include/llvm/Analysis/DataStructure.h
@@ -355,17 +355,31 @@ class FunctionDSGraph {
// as the data structure graph itself.
//
PointerValSet cloneFunctionIntoSelf(const FunctionDSGraph &G, bool ValueMap);
- bool RemoveUnreachableShadowNodes();
- bool UnlinkUndistinguishableShadowNodes();
-public:
+ bool RemoveUnreachableNodes();
+ bool UnlinkUndistinguishableNodes();
+
+private:
+ // Define the interface only accessable to DataStructure
+ friend class DataStructure;
FunctionDSGraph(Function *F);
FunctionDSGraph(const FunctionDSGraph &DSG);
~FunctionDSGraph();
void computeClosure(const DataStructure &DS);
+public:
Function *getFunction() const { return Func; }
+ // getEscapingAllocations - Add all allocations that escape the current
+ // function to the specified vector.
+ //
+ void getEscapingAllocations(std::vector<AllocDSNode*> &Allocs);
+
+ // getEscapingAllocations - Add all allocations that do not escape the current
+ // function to the specified vector.
+ //
+ void getNonEscapingAllocations(std::vector<AllocDSNode*> &Allocs);
+
void printFunction(std::ostream &O, const char *Label) const;
};
diff --git a/include/llvm/Analysis/DataStructure/DataStructure.h b/include/llvm/Analysis/DataStructure/DataStructure.h
index 5132208..6a04827 100644
--- a/include/llvm/Analysis/DataStructure/DataStructure.h
+++ b/include/llvm/Analysis/DataStructure/DataStructure.h
@@ -355,17 +355,31 @@ class FunctionDSGraph {
// as the data structure graph itself.
//
PointerValSet cloneFunctionIntoSelf(const FunctionDSGraph &G, bool ValueMap);
- bool RemoveUnreachableShadowNodes();
- bool UnlinkUndistinguishableShadowNodes();
-public:
+ bool RemoveUnreachableNodes();
+ bool UnlinkUndistinguishableNodes();
+
+private:
+ // Define the interface only accessable to DataStructure
+ friend class DataStructure;
FunctionDSGraph(Function *F);
FunctionDSGraph(const FunctionDSGraph &DSG);
~FunctionDSGraph();
void computeClosure(const DataStructure &DS);
+public:
Function *getFunction() const { return Func; }
+ // getEscapingAllocations - Add all allocations that escape the current
+ // function to the specified vector.
+ //
+ void getEscapingAllocations(std::vector<AllocDSNode*> &Allocs);
+
+ // getEscapingAllocations - Add all allocations that do not escape the current
+ // function to the specified vector.
+ //
+ void getNonEscapingAllocations(std::vector<AllocDSNode*> &Allocs);
+
void printFunction(std::ostream &O, const char *Label) const;
};