[pypy-commit] pypy optresult-unroll: kill mark_opaque_ptr
fijal
noreply at buildbot.pypy.org
Mon Sep 7 12:20:59 CEST 2015
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: optresult-unroll
Changeset: r79501:5ed69a741865
Date: 2015-09-07 12:21 +0200
http://bitbucket.org/pypy/pypy/changeset/5ed69a741865/
Log: kill mark_opaque_ptr
diff --git a/rpython/jit/codewriter/jtransform.py b/rpython/jit/codewriter/jtransform.py
--- a/rpython/jit/codewriter/jtransform.py
+++ b/rpython/jit/codewriter/jtransform.py
@@ -1106,10 +1106,6 @@
if self._is_gc(op.args[0]):
return op
- def rewrite_op_cast_opaque_ptr(self, op):
- # None causes the result of this op to get aliased to op.args[0]
- return [SpaceOperation('mark_opaque_ptr', op.args, None), None]
-
def rewrite_op_force_cast(self, op):
v_arg = op.args[0]
v_result = op.result
diff --git a/rpython/jit/codewriter/test/test_jtransform.py b/rpython/jit/codewriter/test/test_jtransform.py
--- a/rpython/jit/codewriter/test/test_jtransform.py
+++ b/rpython/jit/codewriter/test/test_jtransform.py
@@ -1328,19 +1328,6 @@
tr = Transformer(None, None)
py.test.raises(NotImplementedError, tr.rewrite_operation, op)
-def test_cast_opaque_ptr():
- S = lltype.GcStruct("S", ("x", lltype.Signed))
- v1 = varoftype(lltype.Ptr(S))
- v2 = varoftype(lltype.Ptr(rclass.OBJECT))
-
- op = SpaceOperation('cast_opaque_ptr', [v1], v2)
- tr = Transformer()
- [op1, op2] = tr.rewrite_operation(op)
- assert op1.opname == 'mark_opaque_ptr'
- assert op1.args == [v1]
- assert op1.result is None
- assert op2 is None
-
def _test_threadlocalref_get(loop_inv):
from rpython.rlib.rthread import ThreadLocalField
tlfield = ThreadLocalField(lltype.Signed, 'foobar_test_',
diff --git a/rpython/jit/metainterp/blackhole.py b/rpython/jit/metainterp/blackhole.py
--- a/rpython/jit/metainterp/blackhole.py
+++ b/rpython/jit/metainterp/blackhole.py
@@ -532,9 +532,6 @@
ll_assert((i & 1) == 1, "bhimpl_cast_int_to_ptr: not an odd int")
return lltype.cast_int_to_ptr(llmemory.GCREF, i)
- @arguments("r")
- def bhimpl_mark_opaque_ptr(a):
- pass
@arguments("r", "i")
def bhimpl_record_exact_class(a, b):
pass
diff --git a/rpython/jit/metainterp/heapcache.py b/rpython/jit/metainterp/heapcache.py
--- a/rpython/jit/metainterp/heapcache.py
+++ b/rpython/jit/metainterp/heapcache.py
@@ -163,7 +163,7 @@
# its argument
# XXX really?
pass
- # GETFIELD_GC, MARK_OPAQUE_PTR, PTR_EQ, and PTR_NE don't escape their
+ # GETFIELD_GC, PTR_EQ, and PTR_NE don't escape their
# arguments
elif (opnum != rop.GETFIELD_GC_R and
opnum != rop.GETFIELD_GC_I and
@@ -171,7 +171,6 @@
opnum != rop.GETFIELD_GC_PURE_R and
opnum != rop.GETFIELD_GC_PURE_I and
opnum != rop.GETFIELD_GC_PURE_F and
- opnum != rop.MARK_OPAQUE_PTR and
opnum != rop.PTR_EQ and
opnum != rop.PTR_NE and
opnum != rop.INSTANCE_PTR_EQ and
diff --git a/rpython/jit/metainterp/optimizeopt/earlyforce.py b/rpython/jit/metainterp/optimizeopt/earlyforce.py
--- a/rpython/jit/metainterp/optimizeopt/earlyforce.py
+++ b/rpython/jit/metainterp/optimizeopt/earlyforce.py
@@ -22,7 +22,6 @@
opnum != rop.SAME_AS_I and
opnum != rop.SAME_AS_R and
opnum != rop.SAME_AS_F and
- opnum != rop.MARK_OPAQUE_PTR and
not is_raw_free(op, opnum)):
for arg in op.getarglist():
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
@@ -746,10 +746,5 @@
optimize_SAME_AS_R = optimize_SAME_AS_I
optimize_SAME_AS_F = optimize_SAME_AS_I
- def optimize_MARK_OPAQUE_PTR(self, op):
- #value = self.getvalue(op.getarg(0))
- #self.optimizer.opaque_pointers[value] = True
- pass # XXX what do we do with that?
-
dispatch_opt = make_dispatcher_method(Optimizer, 'optimize_',
default=Optimizer.optimize_default)
diff --git a/rpython/jit/metainterp/pyjitpl.py b/rpython/jit/metainterp/pyjitpl.py
--- a/rpython/jit/metainterp/pyjitpl.py
+++ b/rpython/jit/metainterp/pyjitpl.py
@@ -269,10 +269,6 @@
def opimpl_ptr_iszero(self, box):
return self.execute(rop.PTR_EQ, box, history.CONST_NULL)
- @arguments("box")
- def opimpl_mark_opaque_ptr(self, box):
- return self.execute(rop.MARK_OPAQUE_PTR, box)
-
@arguments("box", "box")
def opimpl_record_exact_class(self, box, clsbox):
from rpython.rtyper.lltypesystem import llmemory
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
@@ -770,7 +770,6 @@
'_MALLOC_LAST',
'FORCE_TOKEN/0/r',
'VIRTUAL_REF/2/r', # removed before it's passed to the backend
- 'MARK_OPAQUE_PTR/1/n',
# this one has no *visible* side effect, since the virtualizable
# must be forced, however we need to execute it anyway
'_NOSIDEEFFECT_LAST', # ----- end of no_side_effect operations -----
More information about the pypy-commit
mailing list