* Remove RemoveUnreachableShadowNodes & UnlinkUndistinguishableShadowNodes
authorChris Lattner <sabre@nondot.org>
Thu, 28 Mar 2002 19:15:38 +0000 (19:15 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 28 Mar 2002 19:15:38 +0000 (19:15 +0000)
  to reflect the fact that they actually operate on arbitrary nodes
* Clean up public interface of FunctionDSGraph
* add getEscapingAllocations & getNonEscapingAllocations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2019 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/DataStructure.h
include/llvm/Analysis/DataStructure/DataStructure.h

index 5132208277e2ebf2c4962c01722186a4e18bff05..6a048276f1c41230c9a4f45b0cbe25fe3a9131ff 100644 (file)
@@ -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;
 };
 
index 5132208277e2ebf2c4962c01722186a4e18bff05..6a048276f1c41230c9a4f45b0cbe25fe3a9131ff 100644 (file)
@@ -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;
 };