aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHakan Ardo <hakan@debian.org>2011-09-27 19:32:45 +0200
committerHakan Ardo <hakan@debian.org>2011-09-27 19:32:45 +0200
commitaec318260e43373538e2330a64d0d3ac796a915a (patch)
treed70da4951de6112c13005c85ce3c6907ee550e71 /pypy/jit/metainterp/optimizeopt/optimizer.py
parentfix merge (diff)
downloadpypy-aec318260e43373538e2330a64d0d3ac796a915a.tar.gz
pypy-aec318260e43373538e2330a64d0d3ac796a915a.tar.bz2
pypy-aec318260e43373538e2330a64d0d3ac796a915a.zip
Make forced virtuals emit ops using OptVirtualize.emit_operation(). This makes the heap optimizer see those ops, but in the wrong order and everything becomes an obsure mess :( Maybe I can fix that...
Diffstat (limited to 'pypy/jit/metainterp/optimizeopt/optimizer.py')
-rw-r--r--pypy/jit/metainterp/optimizeopt/optimizer.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pypy/jit/metainterp/optimizeopt/optimizer.py b/pypy/jit/metainterp/optimizeopt/optimizer.py
index 85d6592b0b..fec11c205d 100644
--- a/pypy/jit/metainterp/optimizeopt/optimizer.py
+++ b/pypy/jit/metainterp/optimizeopt/optimizer.py
@@ -246,6 +246,10 @@ class Optimization(object):
def emit_operation(self, op):
self.next_optimization.propagate_forward(op)
+ def emit_volatile_operation(self, op):
+ self.optimizer.volatile[op] = True
+ self.emit_operation(op)
+
# FIXME: Move some of these here?
def getvalue(self, box):
return self.optimizer.getvalue(box)
@@ -331,6 +335,8 @@ class Optimizer(Optimization):
self.opaque_pointers = {}
self.replaces_guard = {}
self.newoperations = []
+ self.volatile = {}
+ self.optimizer = self
if loop is not None:
self.call_pure_results = loop.call_pure_results