aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/DataStructure/DSGraph.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-01-22 15:26:52 +0000
committerChris Lattner <sabre@nondot.org>2004-01-22 15:26:52 +0000
commit9e9848d0374d7fb179ed588b5b59ad9af8ffe93a (patch)
treea7515e4097bdd768ee820375b354f61772343bec /include/llvm/Analysis/DataStructure/DSGraph.h
parentc4282a33d1c8b2bcbf420657cae2e2b4a538662d (diff)
Remove const qualifier (all Value*'s are nonconst in DSA, so it's not clear
why this one was) Add new method proto git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10950 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/DataStructure/DSGraph.h')
-rw-r--r--include/llvm/Analysis/DataStructure/DSGraph.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/llvm/Analysis/DataStructure/DSGraph.h b/include/llvm/Analysis/DataStructure/DSGraph.h
index 3b1aff2396..64e0b6bf11 100644
--- a/include/llvm/Analysis/DataStructure/DSGraph.h
+++ b/include/llvm/Analysis/DataStructure/DSGraph.h
@@ -27,7 +27,7 @@ struct DSGraph {
// Public data-type declarations...
typedef hash_map<Value*, DSNodeHandle> ScalarMapTy;
typedef hash_map<Function*, DSNodeHandle> ReturnNodesTy;
- typedef hash_set<const GlobalValue*> GlobalSetTy;
+ typedef hash_set<GlobalValue*> GlobalSetTy;
/// NodeMapTy - This data type is used when cloning one graph into another to
/// keep track of the correspondence between the nodes in the old and new
@@ -270,6 +270,8 @@ public:
/// cloneInto - Clone the specified DSGraph into the current graph. The
/// translated ScalarMap for the old function is filled into the OldValMap
/// member, and the translated ReturnNodes map is returned into ReturnNodes.
+ /// OldNodeMap contains a mapping from the original nodes to the newly cloned
+ /// nodes.
///
/// The CloneFlags member controls various aspects of the cloning process.
///
@@ -277,6 +279,23 @@ public:
ReturnNodesTy &OldReturnNodes, NodeMapTy &OldNodeMap,
unsigned CloneFlags = 0);
+ /// clonePartiallyInto - Clone the reachable subset of the specified DSGraph
+ /// into the current graph, for the specified function.
+ ///
+ /// This differs from cloneInto in that it only clones nodes reachable from
+ /// globals, call nodes, the scalars specified in ValBindings, and the return
+ /// value of the specified function. This method merges the the cloned
+ /// version of the scalars and return value with the specified DSNodeHandles.
+ ///
+ /// On return, OldNodeMap contains a mapping from the original nodes to the
+ /// newly cloned nodes, for the subset of nodes that were actually cloned.
+ ///
+ /// The CloneFlags member controls various aspects of the cloning process.
+ ///
+ void clonePartiallyInto(const DSGraph &G, Function &F, const DSNodeHandle &RetVal,
+ const ScalarMapTy &ValBindings, NodeMapTy &OldNodeMap,
+ unsigned CloneFlags = 0);
+
/// mergeInGraph - The method is used for merging graphs together. If the
/// argument graph is not *this, it makes a clone of the specified graph, then
/// merges the nodes specified in the call site with the formal arguments in