[pypy-commit] pypy share-guard-info: improve the situation
fijal
noreply at buildbot.pypy.org
Sun Sep 13 17:48:20 CEST 2015
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: share-guard-info
Changeset: r79609:30e029463a07
Date: 2015-09-13 17:48 +0200
http://bitbucket.org/pypy/pypy/changeset/30e029463a07/
Log: improve the situation
diff --git a/rpython/jit/metainterp/optimizeopt/optimizer.py b/rpython/jit/metainterp/optimizeopt/optimizer.py
--- a/rpython/jit/metainterp/optimizeopt/optimizer.py
+++ b/rpython/jit/metainterp/optimizeopt/optimizer.py
@@ -587,7 +587,7 @@
elif op.can_raise():
self.exception_might_have_happened = True
if self._emitting:
- if op.has_no_side_effect() or op.is_guard():
+ if op.has_no_side_effect() or op.is_guard() or op.is_jit_debug():
pass
else:
self._last_guard_op = None
diff --git a/rpython/jit/metainterp/resoperation.py b/rpython/jit/metainterp/resoperation.py
--- a/rpython/jit/metainterp/resoperation.py
+++ b/rpython/jit/metainterp/resoperation.py
@@ -236,6 +236,9 @@
return (self.getopnum() == rop.GUARD_OVERFLOW or
self.getopnum() == rop.GUARD_NO_OVERFLOW)
+ def is_jit_debug(self):
+ return rop._JIT_DEBUG_FIRST <= self.getopnim() <= rop._JIT_DEBUG_LAST
+
def is_always_pure(self):
return rop._ALWAYS_PURE_FIRST <= self.getopnum() <= rop._ALWAYS_PURE_LAST
@@ -804,10 +807,12 @@
'UNICODESETITEM/3/n',
'COND_CALL_GC_WB/1d/n', # [objptr] (for the write barrier)
'COND_CALL_GC_WB_ARRAY/2d/n', # [objptr, arrayindex] (write barr. for array)
+ '_JIT_DEBUG_FIRST',
'DEBUG_MERGE_POINT/*/n', # debugging only
'ENTER_PORTAL_FRAME/2/n', # debugging only
'LEAVE_PORTAL_FRAME/1/n', # debugging only
'JIT_DEBUG/*/n', # debugging only
+ '_JIT_DEBUG_LAST',
'VIRTUAL_REF_FINISH/2/n', # removed before it's passed to the backend
'COPYSTRCONTENT/5/n', # src, dst, srcstart, dststart, length
'COPYUNICODECONTENT/5/n',
diff --git a/rpython/jit/metainterp/test/test_ajit.py b/rpython/jit/metainterp/test/test_ajit.py
--- a/rpython/jit/metainterp/test/test_ajit.py
+++ b/rpython/jit/metainterp/test/test_ajit.py
@@ -230,8 +230,8 @@
res = self.meta_interp(f, [6, 32, 16])
assert res == 1692
self.check_trace_count(3)
- self.check_resops({'int_lt': 2, 'int_gt': 4, 'guard_false': 2,
- 'guard_true': 4, 'int_sub': 4, 'jump': 3,
+ self.check_resops({'int_lt': 4, 'int_gt': 4, 'guard_false': 2,
+ 'guard_true': 6, 'int_sub': 4, 'jump': 3,
'int_mul': 3, 'int_add': 4})
def test_loop_invariant_mul_ovf2(self):
More information about the pypy-commit
mailing list