Author: Carl Friedrich Bolz <cfb...@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:
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to