summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-07-02 04:37:00 +0000
committerChris Lattner <sabre@nondot.org>2003-07-02 04:37:00 +0000
commit8fd27150987877508f6be1d6823095354e509ed5 (patch)
treeb9f242b46de6698e3a20e04df298c55afb204490 /include
parent73440f6a15d9268c118bec7e5201aaa2f2efb929 (diff)
downloadllvm-8fd27150987877508f6be1d6823095354e509ed5.tar.gz
llvm-8fd27150987877508f6be1d6823095354e509ed5.tar.bz2
llvm-8fd27150987877508f6be1d6823095354e509ed5.tar.xz
Add new methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7057 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/DSGraph.h12
-rw-r--r--include/llvm/Analysis/DataStructure/DSGraph.h12
2 files changed, 24 insertions, 0 deletions
diff --git a/include/llvm/Analysis/DSGraph.h b/include/llvm/Analysis/DSGraph.h
index 81979cf74e..06b694220d 100644
--- a/include/llvm/Analysis/DSGraph.h
+++ b/include/llvm/Analysis/DSGraph.h
@@ -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()) &&
diff --git a/include/llvm/Analysis/DataStructure/DSGraph.h b/include/llvm/Analysis/DataStructure/DSGraph.h
index 81979cf74e..06b694220d 100644
--- a/include/llvm/Analysis/DataStructure/DSGraph.h
+++ b/include/llvm/Analysis/DataStructure/DSGraph.h
@@ -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()) &&