[llvm-commits] [poolalloc] r155783 - /poolalloc/trunk/lib/DSA/DSGraph.cpp

Will Dietz wdietz2 at illinois.edu
Sat Apr 28 20:21:54 PDT 2012


Author: wdietz2
Date: Sat Apr 28 22:21:54 2012
New Revision: 155783

URL: http://llvm.org/viewvc/llvm-project?rev=155783&view=rev
Log:
Don't clone unresolvable direct calls when merging through callsites.

a) There's no reason to do so, since if they're unresolved (call to decl)
   we'll never be able to resolve them and just clone them everywhere.
b) Conceptually, this matches what the HackedSCCFinder is computing.  Note
   that indirect calls on nodes with the global flag set are also not cloned.

176.gcc was bitten really hard by this (used more than 10G memory for BU),
  and with this fix it and 400.perbmk now run under the 600M limit.

Modified:
    poolalloc/trunk/lib/DSA/DSGraph.cpp

Modified: poolalloc/trunk/lib/DSA/DSGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DSGraph.cpp?rev=155783&r1=155782&r2=155783&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DSGraph.cpp (original)
+++ poolalloc/trunk/lib/DSA/DSGraph.cpp Sat Apr 28 22:21:54 2012
@@ -334,7 +334,7 @@
     bool PathExistsToClonedNode(const DSCallSite &CS) {
       if (PathExistsToClonedNode(CS.getRetVal().getNode()))
         return true;
-      if (CS.isDirectCall() || PathExistsToClonedNode(CS.getCalleeNode()))
+      if (CS.isIndirectCall() && PathExistsToClonedNode(CS.getCalleeNode()))
         return true;
       for (unsigned i = 0, e = CS.getNumPtrArgs(); i != e; ++i)
         if (PathExistsToClonedNode(CS.getPtrArg(i).getNode()))





More information about the llvm-commits mailing list