[pypy-svn] pypy jit-short-preamble: Allow short preambles when there are SETARRAYITEMS or CALL_LOOPINVARIANT

hakanardo commits-noreply at bitbucket.org
Sun Jan 9 11:37:44 CET 2011


Author: Hakan Ardo <hakan at debian.org>
Branch: jit-short-preamble
Changeset: r40505:97170f2e54ca
Date: 2011-01-09 11:35 +0100
http://bitbucket.org/pypy/pypy/changeset/97170f2e54ca/

Log:	Allow short preambles when there are SETARRAYITEMS or
	CALL_LOOPINVARIANT

diff --git a/pypy/jit/metainterp/optimizeopt/unroll.py b/pypy/jit/metainterp/optimizeopt/unroll.py
--- a/pypy/jit/metainterp/optimizeopt/unroll.py
+++ b/pypy/jit/metainterp/optimizeopt/unroll.py
@@ -384,6 +384,16 @@
             descr = op.getdescr()
             self.unsafe_getitem[descr] = True
             return
+        if (opnum == rop.SETARRAYITEM_GC or
+            opnum == rop.SETARRAYITEM_RAW):
+            return # These wont clutter the heap accessable by GETFIELD_*
+                   # FIXME: Implement proper support for ARRAYITEMS
+        if opnum == rop.CALL:
+            effectinfo = op.getdescr().get_extra_info()
+            if effectinfo is not None:
+                for fielddescr in effectinfo.write_descrs_fields:
+                    self.unsafe_getitem[fielddescr] = True
+        debug_print("heap dirty due to op ", opnum)
         self.heap_dirty = True
 
 class ImpossibleLink(JitException):


More information about the Pypy-commit mailing list