From: Chris Lattner Date: Thu, 24 Mar 2005 23:45:20 +0000 (+0000) Subject: add new spliceFrom methods. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=487cd15fdb78c4972eb41879cda29fc62e62744d;p=oota-llvm.git add new spliceFrom methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20823 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/DataStructure/DSGraph.h b/include/llvm/Analysis/DataStructure/DSGraph.h index e8555c65326..430a7bf2816 100644 --- a/include/llvm/Analysis/DataStructure/DSGraph.h +++ b/include/llvm/Analysis/DataStructure/DSGraph.h @@ -154,6 +154,10 @@ public: GlobalSet.clear(); } + /// spliceFrom - Copy all entries from RHS, then clear RHS. + /// + void spliceFrom(DSScalarMap &RHS); + // Access to the global set: the set of all globals currently in the // scalar map. typedef GlobalSetTy::const_iterator global_iterator; @@ -455,6 +459,12 @@ public: void computeCalleeCallerMapping(DSCallSite CS, const Function &Callee, DSGraph &CalleeGraph, NodeMapTy &NodeMap); + /// spliceFrom - Logically perform the operation of cloning the RHS graph into + /// this graph, then clearing the RHS graph. Instead of performing this as + /// two seperate operations, do it as a single, much faster, one. + /// + void spliceFrom(DSGraph &RHS); + /// cloneInto - Clone the specified DSGraph into the current graph. /// /// The CloneFlags member controls various aspects of the cloning process.