[pypy-commit] pypy better-storesink: a small tweak and two XXXs
cfbolz
pypy.commits at gmail.com
Fri Sep 16 17:13:15 EDT 2016
Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: better-storesink
Changeset: r87166:fee47d3d64bd
Date: 2016-09-12 19:33 +0200
http://bitbucket.org/pypy/pypy/changeset/fee47d3d64bd/
Log: a small tweak and two XXXs
diff --git a/rpython/translator/backendopt/cse.py b/rpython/translator/backendopt/cse.py
--- a/rpython/translator/backendopt/cse.py
+++ b/rpython/translator/backendopt/cse.py
@@ -183,6 +183,8 @@
del self.heapcache[k]
def _clear_heapcache_for_effects_of_op(self, op):
+ if not self.heapcache:
+ return
effects = self.analyzer.analyze(op)
self._clear_heapcache_for_effects(effects)
@@ -191,11 +193,13 @@
self.heapcache.clear()
else:
for k in self.heapcache.keys():
+ # XXX slow
key = ('struct', k[0].concretetype, k[1])
if key in effects:
del self.heapcache[k]
def _clear_heapcache_for_loop_blocks(self, blocks):
+ # XXX use result builder
effects = self.analyzer.bottom_result()
for block in blocks:
for op in block.operations:
More information about the pypy-commit
mailing list