Author: Maciej Fijalkowski <fij...@gmail.com> Branch: optresult-unroll Changeset: r79333:d97a7a41ff5b Date: 2015-08-31 20:26 +0200 http://bitbucket.org/pypy/pypy/changeset/d97a7a41ff5b/
Log: kill mark_opaque_ptr tests, the plan is to do it differently anyway diff --git a/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py b/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py --- a/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py +++ b/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py @@ -8544,89 +8544,6 @@ """ self.raises(InvalidLoop, self.optimize_loop, ops, ops) - def test_licm_boxed_opaque_getitem(self): - ops = """ - [p1] - p2 = getfield_gc_r(p1, descr=nextdescr) - mark_opaque_ptr(p2) - guard_class(p2, ConstClass(node_vtable)) [] - i3 = getfield_gc_i(p2, descr=valuedescr) - i4 = call_i(i3, descr=nonwritedescr) - jump(p1) - """ - expected = """ - [p1, p2, i3] - i4 = call_i(i3, descr=nonwritedescr) - jump(p1, p2, i3) - """ - self.optimize_loop(ops, expected) - - def test_licm_boxed_opaque_getitem_unknown_class(self): - # Explanation: the getfield_gc(p2) is done on what starts as - # an opaque object. The getfield_gc(p1) is moved out of the - # (non-preamble) loop. It looks like the getfield_gc(p2) - # should also move out. However, moving the getfield_gc(p2) - # earlier can be dangerous with opaque pointers: we can't move - # it before other guards that indirectly check for which type - # of object is in p2. (In this simple test there are no guard - # at all between the start of the loop and the - # getfield_gc(p2), but in general there are.) - # - # There are two cases: (1) moving the getfield_gc(p2) out of - # the loop into the preamble: this does not look like a - # problem because we already have a getfield_gc(p2) there, on - # the same p2. Case (2) is moving the getfield_gc(p2) into - # the short preamble: this is more problematic because the - # short preamble can't do the indirect checking on p1. - ops = """ - [p1] - p2 = getfield_gc_r(p1, descr=nextdescr) - mark_opaque_ptr(p2) - i3 = getfield_gc_i(p2, descr=valuedescr) - i4 = call_i(i3, descr=nonwritedescr) - jump(p1) - """ - expected = """ - [p1, p2] - i3 = getfield_gc_i(p2, descr=valuedescr) - i4 = call_i(i3, descr=nonwritedescr) - jump(p1, p2) - """ - self.optimize_loop(ops, expected) - - def test_licm_unboxed_opaque_getitem(self): - ops = """ - [p2] - mark_opaque_ptr(p2) - guard_class(p2, ConstClass(node_vtable)) [] - i3 = getfield_gc_i(p2, descr=otherdescr) - i4 = call_i(i3, descr=nonwritedescr) - jump(p2) - """ - expected = """ - [p1, i3] - i4 = call_i(i3, descr=nonwritedescr) - jump(p1, i3) - """ - self.optimize_loop(ops, expected) - - def test_licm_unboxed_opaque_getitem_unknown_class(self): - # see test_licm_boxed_opaque_getitem_unknown_class - ops = """ - [p2] - mark_opaque_ptr(p2) - i3 = getfield_gc_i(p2, descr=otherdescr) - i4 = call_i(i3, descr=nonwritedescr) - jump(p2) - """ - expected = """ - [p2] - i3 = getfield_gc_i(p2, descr=otherdescr) - i4 = call_i(i3, descr=nonwritedescr) - jump(p2) - """ - self.optimize_loop(ops, expected) - def test_only_strengthen_guard_if_class_matches_2(self): ops = """ [p1] _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit