[pypy-svn] r59072 - pypy/dist/pypy/translator/backendopt

arigo at codespeak.net arigo at codespeak.net
Mon Oct 13 15:41:06 CEST 2008


Author: arigo
Date: Mon Oct 13 15:41:04 2008
New Revision: 59072

Modified:
   pypy/dist/pypy/translator/backendopt/mallocv.py
Log:
Avoid a pass over all of translator.graphs.


Modified: pypy/dist/pypy/translator/backendopt/mallocv.py
==============================================================================
--- pypy/dist/pypy/translator/backendopt/mallocv.py	(original)
+++ pypy/dist/pypy/translator/backendopt/mallocv.py	Mon Oct 13 15:41:04 2008
@@ -1,5 +1,6 @@
 from pypy.objspace.flow.model import Variable, Constant, Block, Link
 from pypy.objspace.flow.model import SpaceOperation, FunctionGraph, copygraph
+from pypy.objspace.flow.model import checkgraph
 from pypy.objspace.flow.model import c_last_exception
 from pypy.translator.backendopt.support import log
 from pypy.translator.simplify import join_blocks
@@ -14,12 +15,12 @@
     mallocv = MallocVirtualizer(newgraphs, translator.rtyper, verbose)
     while mallocv.remove_mallocs_once():
         pass
+    for graph in newgraphs:
+        checkgraph(graph)
+        join_blocks(graph)
     assert newgraphs[:len(graphs)] == graphs
     del newgraphs[:len(graphs)]
     translator.graphs.extend(newgraphs)
-    translator.checkgraphs()
-    for graph in translator.graphs:
-        join_blocks(graph)
 
 # ____________________________________________________________
 



More information about the Pypy-commit mailing list