From 09adbbc99e6e7721fc17f73588dee3eaa93c33bb Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 24 Mar 2005 21:17:27 +0000 Subject: [PATCH] only look at successors of globals. This gets us down to "only" 22s in the bu pass for 176.gcc git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20818 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/DataStructure/DataStructure.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index 2b5dfd6eb73..ae4d51b3435 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -1448,10 +1448,15 @@ void DSGraph::mergeInGraph(const DSCallSite &CS, DSScalarMap GSM = Graph.getScalarMap(); for (DSScalarMap::global_iterator GI = GSM.global_begin(), - E = GSM.global_end(); GI != E; ++GI) - if (PathExistsToClonedNode(Graph.getNodeForValue(*GI).getNode(), RC, - NodesReachCopiedNodes)) - GlobalsToCopy.push_back(*GI); + E = GSM.global_end(); GI != E; ++GI) { + DSNode *GlobalNode = Graph.getNodeForValue(*GI).getNode(); + for (DSNode::edge_iterator EI = GlobalNode->edge_begin(), + EE = GlobalNode->edge_end(); EI != EE; ++EI) + if (PathExistsToClonedNode(EI->getNode(), RC, NodesReachCopiedNodes)) { + GlobalsToCopy.push_back(*GI); + break; + } + } // Copy aux calls that are needed. for (unsigned i = 0, e = AuxCallToCopy.size(); i != e; ++i)