Author: Carl Friedrich Bolz <cfb...@gmx.de> Branch: value-profiling Changeset: r81882:7dfb24f5e8c5 Date: 2016-01-21 09:03 +0100 http://bitbucket.org/pypy/pypy/changeset/7dfb24f5e8c5/
Log: fix test_pypy_c tests diff --git a/pypy/module/pypyjit/test_pypy_c/test_00_model.py b/pypy/module/pypyjit/test_pypy_c/test_00_model.py --- a/pypy/module/pypyjit/test_pypy_c/test_00_model.py +++ b/pypy/module/pypyjit/test_pypy_c/test_00_model.py @@ -526,7 +526,7 @@ log = self.run(f) loop, = log.loops_by_filename(self.filepath) call_ops = log.opnames(loop.ops_by_id('call')) - assert call_ops == ['guard_not_invalidated', 'force_token'] # it does not follow inlining + assert call_ops == ['force_token'] # it does not follow inlining # add_ops = log.opnames(loop.ops_by_id('add')) assert add_ops == ['int_add'] @@ -535,7 +535,6 @@ assert ops == [ # this is the actual loop 'guard_not_invalidated', 'int_lt', 'guard_true', 'force_token', 'int_add', - 'force_token', 'int_add', # this is the signal checking stuff 'getfield_raw_i', 'int_lt', 'guard_false', 'jump' diff --git a/pypy/module/pypyjit/test_pypy_c/test_call.py b/pypy/module/pypyjit/test_pypy_c/test_call.py --- a/pypy/module/pypyjit/test_pypy_c/test_call.py +++ b/pypy/module/pypyjit/test_pypy_c/test_call.py @@ -71,7 +71,7 @@ entry_bridge, = log.loops_by_id('call', is_entry_bridge=True) # LOAD_GLOBAL of OFFSET ops = entry_bridge.ops_by_id('cond', opcode='LOAD_GLOBAL') - assert log.opnames(ops) == ["guard_value"] + assert log.opnames(ops) == [] ops = entry_bridge.ops_by_id('add', opcode='LOAD_GLOBAL') assert log.opnames(ops) == [] # @@ -218,7 +218,7 @@ loop, = log.loops_by_id('call') ops = log.opnames(loop.ops_by_id('call')) guards = [ops for ops in ops if ops.startswith('guard')] - assert guards == ["guard_not_invalidated", "guard_no_overflow"] + assert guards == ["guard_no_overflow"] def test_kwargs(self): # this is not a very precise test, could be improved diff --git a/pypy/module/pypyjit/test_pypy_c/test_ffi.py b/pypy/module/pypyjit/test_pypy_c/test_ffi.py --- a/pypy/module/pypyjit/test_pypy_c/test_ffi.py +++ b/pypy/module/pypyjit/test_pypy_c/test_ffi.py @@ -422,7 +422,6 @@ i114 = int_ne(i160, i112) guard_false(i114, descr=...) --TICK-- - i123 = arraylen_gc(p67, descr=<ArrayP .>) i119 = call_i(ConstClass(_ll_1_raw_malloc_varsize__Signed), 6, descr=<Calli . i EF=5 OS=110>) raw_store(i119, 0, i160, descr=<ArrayS 2>) raw_store(i119, 2, i160, descr=<ArrayS 2>) diff --git a/pypy/module/pypyjit/test_pypy_c/test_micronumpy.py b/pypy/module/pypyjit/test_pypy_c/test_micronumpy.py --- a/pypy/module/pypyjit/test_pypy_c/test_micronumpy.py +++ b/pypy/module/pypyjit/test_pypy_c/test_micronumpy.py @@ -299,10 +299,12 @@ i129 = int_add(i55, i128) f149 = raw_load_f(i100, i129, descr=<ArrayF 8>) i151 = int_add(i117, 1) + i92 = getfield_raw_i(54402752, descr=<FieldS pypysig_long_struct.c_value 0>) setfield_gc(p156, i55, descr=<FieldS pypy.module.micronumpy.iterators.IterState.inst_offset .+>) setarrayitem_gc(p150, 1, 0, descr=<ArrayS .+>) setarrayitem_gc(p150, 0, 0, descr=<ArrayS .+>) - --TICK-- + i95 = int_lt(i92, 0) + guard_false(i95, descr=...) jump(..., descr=...) """) @@ -354,12 +356,13 @@ guard_false(i92, descr=...) i93 = int_add(i91, 1) setfield_gc(p23, i93, descr=<FieldS pypy.objspace.std.iterobject.W_AbstractSeqIterObject.inst_index 8>) + guard_not_invalidated? i94 = int_ge(i91, i56) guard_false(i94, descr=...) i96 = int_mul(i91, i58) i97 = int_add(i51, i96) f98 = raw_load_f(i63, i97, descr=<ArrayF 8>) - guard_not_invalidated(descr=...) + guard_not_invalidated? f100 = float_mul(f98, 0.500000) i101 = int_add(i79, 1) i102 = arraylen_gc(p85, descr=<ArrayP .>) diff --git a/pypy/module/pypyjit/test_pypy_c/test_misc.py b/pypy/module/pypyjit/test_pypy_c/test_misc.py --- a/pypy/module/pypyjit/test_pypy_c/test_misc.py +++ b/pypy/module/pypyjit/test_pypy_c/test_misc.py @@ -114,16 +114,14 @@ assert log.result == main(1000) loop, = log.loops_by_filename(self.filepath) assert loop.match(""" + guard_not_invalidated? i12 = int_is_true(i4) guard_true(i12, descr=...) - guard_not_invalidated(descr=...) - i13 = int_add_ovf(i8, i9) + guard_not_invalidated? + i13 = int_add_ovf(i8, 2) guard_no_overflow(descr=...) - i10 = int_mul_ovf(2, i61) + i14 = int_add_ovf(i13, 2) guard_no_overflow(descr=...) - i14 = int_add_ovf(i13, i10) - guard_no_overflow(descr=...) - setfield_gc(p7, i11, descr=...) i17 = int_sub_ovf(i4, 1) guard_no_overflow(descr=...) --TICK-- @@ -151,9 +149,10 @@ setfield_gc(p9, i17, descr=<.* .*W_XRangeIterator.inst_current .*>) guard_not_invalidated(descr=...) i18 = force_token() + i75 = int_sub(i71, 1) i21 = int_lt(i10, 0) guard_false(i21, descr=...) - i22 = int_lt(i10, i14) + i22 = int_lt(i10, _) guard_true(i22, descr=...) i23 = int_add_ovf(i6, i10) guard_no_overflow(descr=...) diff --git a/pypy/module/pypyjit/test_pypy_c/test_thread.py b/pypy/module/pypyjit/test_pypy_c/test_thread.py --- a/pypy/module/pypyjit/test_pypy_c/test_thread.py +++ b/pypy/module/pypyjit/test_pypy_c/test_thread.py @@ -33,6 +33,7 @@ import thread local = thread._local() local.x = 1 + local.x = 2 # make it not constant i = 0 while i < n: i += local.x @@ -41,9 +42,10 @@ assert round(log.result, 6) == round(main(500), 6) loop, = log.loops_by_filename(self.filepath) assert loop.match(""" + guard_not_invalidated? i53 = int_lt(i48, i27) guard_true(i53, descr=...) - guard_not_invalidated(descr=...) + guard_not_invalidated? i54 = int_add_ovf(i48, i47) guard_no_overflow(descr=...) --TICK-- diff --git a/pypy/module/pypyjit/test_pypy_c/test_weakref.py b/pypy/module/pypyjit/test_pypy_c/test_weakref.py --- a/pypy/module/pypyjit/test_pypy_c/test_weakref.py +++ b/pypy/module/pypyjit/test_pypy_c/test_weakref.py @@ -25,8 +25,6 @@ i61 = int_add(i58, 1) setfield_gc(p18, i61, descr=<FieldS pypy.module.__builtin__.functional.W_XRangeIterator.inst_current 8>) guard_not_invalidated(descr=...) - p62 = getfield_gc_r(ConstPtr(ptr37), descr=<FieldP pypy.objspace.std.dictmultiobject.W_DictMultiObject.inst_strategy \d+>) - guard_value(p62, ConstPtr(ptr39), descr=...) p65 = getfield_gc_r(p14, descr=<FieldP pypy.objspace.std.mapdict.W_ObjectObjectSize5.inst_map \d+>) guard_value(p65, ConstPtr(ptr45), descr=...) p67 = force_token() _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit