[pypy-commit] pypy jit-targets: propagate quasi_immutable_deps

hakanardo noreply at buildbot.pypy.org
Sun Nov 13 11:20:25 CET 2011


Author: Hakan Ardo <hakan at debian.org>
Branch: jit-targets
Changeset: r49366:224f5793feda
Date: 2011-11-13 11:19 +0100
http://bitbucket.org/pypy/pypy/changeset/224f5793feda/

Log:	propagate quasi_immutable_deps

diff --git a/pypy/jit/metainterp/compile.py b/pypy/jit/metainterp/compile.py
--- a/pypy/jit/metainterp/compile.py
+++ b/pypy/jit/metainterp/compile.py
@@ -139,8 +139,12 @@
     loop = create_empty_loop(metainterp)        
     loop.inputargs = part.inputargs
     loop.operations = part.operations
+    loop.quasi_immutable_deps = {}
+    if part.quasi_immutable_deps:
+        loop.quasi_immutable_deps.update(part.quasi_immutable_deps)
     while part.operations[-1].getopnum() == rop.LABEL:
         inliner = Inliner(inputargs, jumpargs)
+        part.quasi_immutable_deps = None
         part.operations = [part.operations[-1]] + \
                           [inliner.inline_op(h_ops[i]) for i in range(start, len(h_ops))] + \
                           [ResOperation(rop.JUMP, [inliner.inline_arg(a) for a in jumpargs],
@@ -155,7 +159,11 @@
             return None
             
         loop.operations = loop.operations[:-1] + part.operations
+        if part.quasi_immutable_deps:
+            loop.quasi_immutable_deps.update(part.quasi_immutable_deps)
 
+    if not loop.quasi_immutable_deps:
+        loop.quasi_immutable_deps = None
     for box in loop.inputargs:
         assert isinstance(box, Box)
 
@@ -206,6 +214,14 @@
     loop = partial_trace
     loop.operations = loop.operations[:-1] + part.operations
 
+    quasi_immutable_deps = {}
+    if loop.quasi_immutable_deps:
+        quasi_immutable_deps.update(loop.quasi_immutable_deps)
+    if part.quasi_immutable_deps:
+        quasi_immutable_deps.update(part.quasi_immutable_deps)
+    if quasi_immutable_deps:
+        loop.quasi_immutable_deps = quasi_immutable_deps
+
     for box in loop.inputargs:
         assert isinstance(box, Box)
 


More information about the pypy-commit mailing list