[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Mar 21 17:50:55 PST 2005
Changes in directory llvm/lib/Analysis/DataStructure:
TopDownClosure.cpp updated: 1.83 -> 1.84
---
Log message:
When making a clone of a DSGraph from the BU pass, make sure to remember that
this clone is supposed to be used for *ALL* of the functions in the SCC.
This fixes the memory explosion problem the TD pass was having, reducing the
memory growth from 24MB -> 3.5MB on povray and 270MB ->8.3MB on perlbmk!
This obviously also speeds up the TD pass *a lot*.
---
Diffs of the changes: (+8 -1)
TopDownClosure.cpp | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletion(-)
Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp
diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.83 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.84
--- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.83 Mon Mar 21 18:12:00 2005
+++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Mon Mar 21 19:50:42 2005
@@ -105,8 +105,8 @@
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isExternal())
getOrCreateDSGraph(*I);
+ return false;
}
-//return false;
#endif
@@ -154,6 +154,13 @@
assert(G->getAuxFunctionCalls().empty() && "Cloned aux calls?");
G->setPrintAuxCalls();
G->setGlobalsGraph(GlobalsGraph);
+
+ // Note that this graph is the graph for ALL of the function in the SCC, not
+ // just F.
+ for (DSGraph::retnodes_iterator RI = G->retnodes_begin(),
+ E = G->retnodes_end(); RI != E; ++RI)
+ if (RI->first != &F)
+ DSInfo[RI->first] = G;
}
return *G;
}
More information about the llvm-commits
mailing list