Author: fijal
Branch: jit-leaner-frontend
Changeset: r83320:26aeb872ebe0
Date: 2016-03-24 18:06 +0200
http://bitbucket.org/pypy/pypy/changeset/26aeb872ebe0/
Log: since we never allocate resops in the frontend, try a bit harder to
have less copies
diff --git a/rpython/jit/metainterp/optimizeopt/info.py
b/rpython/jit/metainterp/optimizeopt/info.py
--- a/rpython/jit/metainterp/optimizeopt/info.py
+++ b/rpython/jit/metainterp/optimizeopt/info.py
@@ -144,7 +144,8 @@
op.set_forwarded(None)
optforce.emit_operation(op)
newop = optforce.getlastop()
- op.set_forwarded(newop)
+ if newop is not op:
+ op.set_forwarded(newop)
newop.set_forwarded(self)
descr = self.descr
self._is_virtual = False
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
@@ -563,7 +563,7 @@
return # can happen e.g. if we postpone the operation that becomes
# constant
# XXX kill, requires thinking
- op = self.replace_op_with(op, op.opnum)
+ #op = self.replace_op_with(op, op.opnum)
for i in range(op.numargs()):
arg = self.force_box(op.getarg(i))
op.setarg(i, arg)
@@ -592,7 +592,7 @@
self._newoperations.append(op)
def emit_guard_operation(self, op, pendingfields):
- guard_op = self.replace_op_with(op, op.getopnum())
+ guard_op = op # self.replace_op_with(op, op.getopnum())
opnum = guard_op.getopnum()
# If guard_(no)_exception is merged with another previous guard, then
# it *should* be in "some_call;guard_not_forced;guard_(no)_exception".
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit