Author: Maciej Fijalkowski <[email protected]>
Branch: optresult-unroll
Changeset: r79363:b36276bbef65
Date: 2015-09-01 20:30 +0200
http://bitbucket.org/pypy/pypy/changeset/b36276bbef65/
Log: we don't need to force short preamble just by doing setfield
diff --git a/rpython/jit/metainterp/optimizeopt/heap.py
b/rpython/jit/metainterp/optimizeopt/heap.py
--- a/rpython/jit/metainterp/optimizeopt/heap.py
+++ b/rpython/jit/metainterp/optimizeopt/heap.py
@@ -76,7 +76,7 @@
if self.possible_aliasing(optheap, structinfo):
self.force_lazy_setfield(optheap, op.getdescr())
assert not self.possible_aliasing(optheap, structinfo)
- cached_field = self._getfield(structinfo, op.getdescr(), optheap)
+ cached_field = self._getfield(structinfo, op.getdescr(), optheap,
False)
if cached_field is not None:
cached_field = optheap.get_box_replacement(cached_field)
@@ -118,9 +118,11 @@
def _getvalue(self, op):
return op.getarg(1)
- def _getfield(self, opinfo, descr, optheap):
+ def _getfield(self, opinfo, descr, optheap, true_force=True):
res = opinfo.getfield(descr, optheap)
if isinstance(res, PreambleOp):
+ if not true_force:
+ return res.op
res = optheap.optimizer.force_op_from_preamble(res)
opinfo.setfield(descr, None, res, optheap)
return res
@@ -163,9 +165,11 @@
def _getvalue(self, op):
return op.getarg(2)
- def _getfield(self, opinfo, descr, optheap):
+ def _getfield(self, opinfo, descr, optheap, true_force=True):
res = opinfo.getitem(descr, self.index, optheap)
if isinstance(res, PreambleOp):
+ if not true_force:
+ return res.op
index = res.preamble_op.getarg(1).getint()
res = optheap.optimizer.force_op_from_preamble(res)
opinfo.setitem(descr, index, None, res, optheap=optheap)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit