[llvm-commits] [poolalloc] r122039 - in /poolalloc/trunk/lib/DSA: DataStructure.cpp TopDownClosure.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Thu Dec 16 21:14:20 PST 2010
Author: aggarwa4
Date: Thu Dec 16 23:14:19 2010
New Revision: 122039
URL: http://llvm.org/viewvc/llvm-project?rev=122039&view=rev
Log:
Making sure behavior with and without cloning is
identical. Earlier only TD was using cloning, and
as in r121232, while cloning the DontCloneAuxCallNodes
flag was set. Thus the AuxCall list for the DSGraphs
in TD was empty. We must maintain that property. Fixes
failures on lit tests, where extra nodes were getting
marked I.
Modified:
poolalloc/trunk/lib/DSA/DataStructure.cpp
poolalloc/trunk/lib/DSA/TopDownClosure.cpp
Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=122039&r1=122038&r2=122039&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructure.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructure.cpp Thu Dec 16 23:14:19 2010
@@ -1345,6 +1345,8 @@
DSGraph* BaseGraph = GraphSource->getDSGraph(*F);
if (Clone) {
G = new DSGraph(BaseGraph, GlobalECs, *TypeSS);
+ if (resetAuxCalls)
+ G->getAuxFunctionCalls() = G->getFunctionCalls();
} else {
G = new DSGraph(GlobalECs, GraphSource->getTargetData(), *TypeSS);
G->spliceFrom(BaseGraph);
Modified: poolalloc/trunk/lib/DSA/TopDownClosure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/TopDownClosure.cpp?rev=122039&r1=122038&r2=122039&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/TopDownClosure.cpp (original)
+++ poolalloc/trunk/lib/DSA/TopDownClosure.cpp Thu Dec 16 23:14:19 2010
@@ -81,6 +81,13 @@
init(useEQBU ? &getAnalysis<EquivBUDataStructures>()
: &getAnalysis<BUDataStructures>(),
true, true, true, false);
+
+ for (Module::iterator F = M.begin(); F != M.end(); ++F) {
+ if (!(F->isDeclaration())){
+ DSGraph *G = getOrCreateGraph(F);
+ G->getAuxFunctionCalls().clear();
+ }
+ }
// Figure out which functions must not mark their arguments complete because
// they are accessible outside this compilation unit. Currently, these
// arguments are functions which are reachable by incomplete or external
More information about the llvm-commits
mailing list