[pypy-commit] pypy better-storesink: two fixes
cfbolz
pypy.commits at gmail.com
Fri Sep 16 17:12:59 EDT 2016
Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: better-storesink
Changeset: r87157:c97644fd33d0
Date: 2016-09-06 19:38 +0200
http://bitbucket.org/pypy/pypy/changeset/c97644fd33d0/
Log: two fixes
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
@@ -127,8 +127,6 @@
break
results.append(otherres)
else:
- listargs = list(args)
- listargs[0] = inputarg
newkey = (self.variable_families.find_rep(inputarg), fieldname)
newres = res
if isinstance(res, Variable):
@@ -172,10 +170,13 @@
self._clear_heapcache_for_effects(effects)
def _clear_heapcache_for_effects(self, effects):
- for k in self.heapcache.keys():
- key = ('struct', k[0].concretetype, k[1])
- if key in effects:
- del self.heapcache[k]
+ if self.analyzer.is_top_result(effects):
+ self.heapcache.clear()
+ else:
+ for k in self.heapcache.keys():
+ key = ('struct', k[0].concretetype, k[1])
+ if key in effects:
+ del self.heapcache[k]
def _clear_heapcache_for_loop_blocks(self, blocks):
effects = self.analyzer.bottom_result()
More information about the pypy-commit
mailing list