Author: Maciej Fijalkowski <fij...@gmail.com> Branch: optresult-unroll Changeset: r78842:70d324743d57 Date: 2015-08-06 22:25 +0200 http://bitbucket.org/pypy/pypy/changeset/70d324743d57/
Log: hack differently 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 @@ -326,7 +326,7 @@ return op in self.inparg_dict def get_constant_box(self, box): - box = self.force_box(box) + box = self.get_box_replacement(box) if isinstance(box, Const): return box if (box.type == 'i' and box.get_forwarded() and diff --git a/rpython/jit/metainterp/optimizeopt/pure.py b/rpython/jit/metainterp/optimizeopt/pure.py --- a/rpython/jit/metainterp/optimizeopt/pure.py +++ b/rpython/jit/metainterp/optimizeopt/pure.py @@ -129,6 +129,10 @@ def optimize_CALL_PURE_I(self, op): # Step 1: check if all arguments are constant + for arg in op.getarglist(): + self.optimizer.force_box(arg) + # XXX hack to ensure that virtuals that are + # constant are presented that way result = self._can_optimize_call_pure(op) if result is not None: # this removes a CALL_PURE with all constant arguments. _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit