Add new methods
authorChris Lattner <sabre@nondot.org>
Wed, 2 Jul 2003 04:37:00 +0000 (04:37 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 2 Jul 2003 04:37:00 +0000 (04:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7057 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 81979cf74ec28216c5165d19cdf6e49c15aaeaec..06b694220db9035b9769eb1abf5efcdcf70a79b1 100644 (file)
@@ -136,6 +136,12 @@ public:
     return I->second;
   }
 
+  const DSNodeHandle &getReturnNodeFor(Function &F) const {
+    ReturnNodesTy::const_iterator I = ReturnNodes.find(&F);
+    assert(I != ReturnNodes.end() && "F not in this DSGraph!");
+    return I->second;
+  }
+
   /// getGraphSize - Return the number of nodes in this graph.
   ///
   unsigned getGraphSize() const {
@@ -218,6 +224,12 @@ public:
   void mergeInGraph(const DSCallSite &CS, Function &F, const DSGraph &Graph,
                     unsigned CloneFlags);
 
+
+  /// getCallSiteForArguments - Get the arguments and return value bindings for
+  /// the specified function in the current graph.
+  ///
+  DSCallSite getCallSiteForArguments(Function &F) const;
+
   // Methods for checking to make sure graphs are well formed...
   void AssertNodeInGraph(const DSNode *N) const {
     assert((!N || find(Nodes.begin(), Nodes.end(), N) != Nodes.end()) &&
index 81979cf74ec28216c5165d19cdf6e49c15aaeaec..06b694220db9035b9769eb1abf5efcdcf70a79b1 100644 (file)
@@ -136,6 +136,12 @@ public:
     return I->second;
   }
 
+  const DSNodeHandle &getReturnNodeFor(Function &F) const {
+    ReturnNodesTy::const_iterator I = ReturnNodes.find(&F);
+    assert(I != ReturnNodes.end() && "F not in this DSGraph!");
+    return I->second;
+  }
+
   /// getGraphSize - Return the number of nodes in this graph.
   ///
   unsigned getGraphSize() const {
@@ -218,6 +224,12 @@ public:
   void mergeInGraph(const DSCallSite &CS, Function &F, const DSGraph &Graph,
                     unsigned CloneFlags);
 
+
+  /// getCallSiteForArguments - Get the arguments and return value bindings for
+  /// the specified function in the current graph.
+  ///
+  DSCallSite getCallSiteForArguments(Function &F) const;
+
   // Methods for checking to make sure graphs are well formed...
   void AssertNodeInGraph(const DSNode *N) const {
     assert((!N || find(Nodes.begin(), Nodes.end(), N) != Nodes.end()) &&