[llvm-commits] [poolalloc] r108291 - /poolalloc/trunk/lib/DSA/TopDownClosure.cpp
Will Dietz
wdietz2 at illinois.edu
Tue Jul 13 15:45:25 PDT 2010
Author: wdietz2
Date: Tue Jul 13 17:45:25 2010
New Revision: 108291
URL: http://llvm.org/viewvc/llvm-project?rev=108291&view=rev
Log:
While skipping calls within the SCC, assume functions that
are declarations aren't part of this SCC.
Allows DSA to execute on programs with function pointers to decls.
Fixes FPDeclaration regression test.
Modified:
poolalloc/trunk/lib/DSA/TopDownClosure.cpp
Modified: poolalloc/trunk/lib/DSA/TopDownClosure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/TopDownClosure.cpp?rev=108291&r1=108290&r2=108291&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/TopDownClosure.cpp (original)
+++ poolalloc/trunk/lib/DSA/TopDownClosure.cpp Tue Jul 13 17:45:25 2010
@@ -304,7 +304,8 @@
IPE = callgraph.callee_end(CI->getCallSite());
// Skip over all calls to this graph (SCC calls).
- while (IPI != IPE && getDSGraph(**IPI) == DSG)
+ // Note that Functions that are just declarations are their own SCC
+ while (IPI != IPE && !(*IPI)->isDeclaration() && getDSGraph(**IPI) == DSG)
++IPI;
// All SCC calls?
@@ -314,7 +315,7 @@
++IPI;
// Skip over more SCC calls.
- while (IPI != IPE && getDSGraph(**IPI) == DSG)
+ while (IPI != IPE && !(*IPI)->isDeclaration() && getDSGraph(**IPI) == DSG)
++IPI;
// If there is exactly one callee from this call site, remember the edge in
More information about the llvm-commits
mailing list