1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 22:31:12 +02:00

Prevent LICM of memory accesses guarded by effect-free predicates

* module/language/cps/licm.scm (loop-invariant?): Read or write effects
  can be guarded by effect-free branches; prevent hoisting of these
  expressions if the term isn't always reachable.
This commit is contained in:
Andy Wingo 2018-01-05 11:48:06 +01:00
parent 51fd5952cb
commit e4e02d8489

View file

@ -55,7 +55,7 @@
(and
(not (causes-effect? fx &allocation))
(or always-reached?
(not (causes-effect? fx &type-check)))
(not (causes-effect? fx (logior &type-check &read &write))))
(or (not (causes-effect? fx &write))
(intmap-fold (lambda (label fx* invariant?)
(and invariant?