[llvm-commits] [poolalloc] r160178 - /poolalloc/trunk/lib/AssistDS/DSNodeEquivs.cpp

Will Dietz wdietz2 at illinois.edu
Fri Jul 13 11:43:41 PDT 2012


Author: wdietz2
Date: Fri Jul 13 13:43:41 2012
New Revision: 160178

URL: http://llvm.org/viewvc/llvm-project?rev=160178&view=rev
Log:
DSNodeEquivs: Clear NodeMap before re-using to avoid reprocessing.

When equivalencing nodes to the GlobalsGraph, clear the mappings
between each iteration so that we don't re-equivalence an
ever-growing set of mappings.

Clearly a bug, but for the curious here's some timing comparisons:
403.gcc: 93s -> 4s
400.perlbench: 25s -> 1s

Much better.

Modified:
    poolalloc/trunk/lib/AssistDS/DSNodeEquivs.cpp

Modified: poolalloc/trunk/lib/AssistDS/DSNodeEquivs.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/DSNodeEquivs.cpp?rev=160178&r1=160177&r2=160178&view=diff
==============================================================================
--- poolalloc/trunk/lib/AssistDS/DSNodeEquivs.cpp (original)
+++ poolalloc/trunk/lib/AssistDS/DSNodeEquivs.cpp Fri Jul 13 13:43:41 2012
@@ -187,6 +187,7 @@
     assert(GlobalNode && "No node for global in global scalar map?");
 
     // Map the two together and all reachable from each...
+    NodeMap.clear();
     DSGraph::computeNodeMapping(LocalNode, GlobalNode, NodeMap, false);
 
     // Build EC's with this mapping.





More information about the llvm-commits mailing list