diff options
author | Chris Lattner <sabre@nondot.org> | 2005-03-22 00:36:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-03-22 00:36:51 +0000 |
commit | a2197139b5894a4225452b9ffc8417c5d05a157b (patch) | |
tree | 5fa4e0fb41ebd258547b622683d295adef6a8572 /lib/Analysis | |
parent | 5805c426dcc2b330565d247677cb12acf7002f15 (diff) | |
download | external_llvm-a2197139b5894a4225452b9ffc8417c5d05a157b.zip external_llvm-a2197139b5894a4225452b9ffc8417c5d05a157b.tar.gz external_llvm-a2197139b5894a4225452b9ffc8417c5d05a157b.tar.bz2 |
Now that the dead ctor is gone, nothing uses the old node mapping exported by
cloneInto: make it an internally used mapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/DataStructure/BottomUpClosure.cpp | 9 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/CompleteBottomUp.cpp | 5 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/DataStructure.cpp | 9 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/EquivClassGraphs.cpp | 8 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/Steensgaard.cpp | 6 |
5 files changed, 12 insertions, 25 deletions
diff --git a/lib/Analysis/DataStructure/BottomUpClosure.cpp b/lib/Analysis/DataStructure/BottomUpClosure.cpp index acb4b30..0a9994c 100644 --- a/lib/Analysis/DataStructure/BottomUpClosure.cpp +++ b/lib/Analysis/DataStructure/BottomUpClosure.cpp @@ -267,10 +267,8 @@ unsigned BUDataStructures::calculateGraphs(Function *F, E = SCCGraphs.end(); I != E; ++I) { DSGraph &G = **I; if (&G != SCCGraph) { - { - DSGraph::NodeMapTy NodeMap; - SCCGraph->cloneInto(G, NodeMap); - } + SCCGraph->cloneInto(G); + // Update the DSInfo map and delete the old graph... for (DSGraph::retnodes_iterator I = G.retnodes_begin(), E = G.retnodes_end(); I != E; ++I) @@ -412,8 +410,7 @@ void BUDataStructures::calculateGraph(DSGraph &Graph) { // If the graph already contains the nodes for the function, don't // bother merging it in again. if (!GI->containsFunction(*I)) { - DSGraph::NodeMapTy NodeMap; - GI->cloneInto(getDSGraph(**I), NodeMap); + GI->cloneInto(getDSGraph(**I)); ++NumBUInlines; } diff --git a/lib/Analysis/DataStructure/CompleteBottomUp.cpp b/lib/Analysis/DataStructure/CompleteBottomUp.cpp index 7b7e62f..103c6bf 100644 --- a/lib/Analysis/DataStructure/CompleteBottomUp.cpp +++ b/lib/Analysis/DataStructure/CompleteBottomUp.cpp @@ -175,10 +175,7 @@ unsigned CompleteBUDataStructures::calculateSCCGraphs(DSGraph &FG, DSGraph *NG = Stack.back(); ValMap[NG] = ~0U; - { - DSGraph::NodeMapTy NodeMap; - FG.cloneInto(*NG, NodeMap); - } + FG.cloneInto(*NG); // Update the DSInfo map and delete the old graph... for (DSGraph::retnodes_iterator I = NG->retnodes_begin(); diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index f76811a..b190b92 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -1168,8 +1168,7 @@ DSGraph::DSGraph(const DSGraph &G, EquivalenceClasses<GlobalValue*> &ECs, unsigned CloneFlags) : GlobalsGraph(0), ScalarMap(ECs), TD(G.TD) { PrintAuxCalls = false; - NodeMapTy NodeMap; - cloneInto(G, NodeMap, CloneFlags); + cloneInto(G, CloneFlags); } DSGraph::~DSGraph() { @@ -1235,12 +1234,12 @@ DSNode *DSGraph::addObjectToGraph(Value *Ptr, bool UseDeclaredType) { /// /// The CloneFlags member controls various aspects of the cloning process. /// -void DSGraph::cloneInto(const DSGraph &G, NodeMapTy &OldNodeMap, - unsigned CloneFlags) { +void DSGraph::cloneInto(const DSGraph &G, unsigned CloneFlags) { TIME_REGION(X, "cloneInto"); - assert(OldNodeMap.empty() && "Returned OldNodeMap should be empty!"); assert(&G != this && "Cannot clone graph into itself!"); + NodeMapTy OldNodeMap; + // Remove alloca or mod/ref bits as specified... unsigned BitsToClear = ((CloneFlags & StripAllocaBit)? DSNode::AllocaNode : 0) | ((CloneFlags & StripModRefBits)? (DSNode::Modified | DSNode::Read) : 0) diff --git a/lib/Analysis/DataStructure/EquivClassGraphs.cpp b/lib/Analysis/DataStructure/EquivClassGraphs.cpp index a778d94..7632200 100644 --- a/lib/Analysis/DataStructure/EquivClassGraphs.cpp +++ b/lib/Analysis/DataStructure/EquivClassGraphs.cpp @@ -270,8 +270,7 @@ void EquivClassGraphs::buildIndirectFunctionSets(Module &M) { } // Clone this member of the equivalence class into MergedG. - DSGraph::NodeMapTy NodeMap; - MergedG.cloneInto(CBUGraph, NodeMap); + MergedG.cloneInto(CBUGraph); } // Merge the return nodes of all functions together. @@ -362,10 +361,7 @@ processSCC(DSGraph &FG, std::vector<DSGraph*> &Stack, unsigned &NextID, // If the SCC found is not the same as those found in CBU, make sure to // merge the graphs as appropriate. - { - DSGraph::NodeMapTy NodeMap; - FG.cloneInto(*NG, NodeMap); - } + FG.cloneInto(*NG); // Update the DSInfo map and delete the old graph... for (DSGraph::retnodes_iterator I = NG->retnodes_begin(); diff --git a/lib/Analysis/DataStructure/Steensgaard.cpp b/lib/Analysis/DataStructure/Steensgaard.cpp index 734f26b..17863d1 100644 --- a/lib/Analysis/DataStructure/Steensgaard.cpp +++ b/lib/Analysis/DataStructure/Steensgaard.cpp @@ -123,10 +123,8 @@ bool Steens::runOnModule(Module &M) { // into this graph. // for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - if (!I->isExternal()) { - DSGraph::NodeMapTy NodeMap; - ResultGraph->cloneInto(LDS.getDSGraph(*I), NodeMap, 0); - } + if (!I->isExternal()) + ResultGraph->cloneInto(LDS.getDSGraph(*I)); ResultGraph->removeTriviallyDeadNodes(); |