diff options
Diffstat (limited to 'lib/Analysis/DataStructure/DataStructure.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/DataStructure.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index f76811a874..b190b9205c 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) |