Rewrite effects analysis to be precise for fields.
authorAndy Wingo <wingo@pobox.com>
Thu, 8 May 2014 08:39:49 +0000 (10:39 +0200)
committerAndy Wingo <wingo@pobox.com>
Thu, 8 May 2014 08:39:49 +0000 (10:39 +0200)
commit5d25fdae37ea39fe8ad657fab16e69b658c53a0e
tree3786a20910ea1470443688b86b5e0269ab5ff2ac
parent466bdf7ee3a4df1606c1406a3f36cd060defbe0c
Rewrite effects analysis to be precise for fields.

* module/language/cps/effects-analysis.scm: Rewrite so that instead of
  the depends/causes effects, there is just &type-check, &allocation,
  &read, and &write.  The object kind is a separate part of the
  bitfield, and the field in the object (if appropriate) is another
  field.  Effects are still a fixnum.  This enables precise effects for
  vectors and structs on all architectures.

  This kind of effects analysis was not possible in Tree-IL because
  Tree-IL relied on logior-ing effects of subexpressions, whereas with
  CPS we have no sub-expressions and we do flow analysis instead.

  (effect-clobbers?): Replace effects-commute? with this inherently
  directional and precise predicate.

* module/language/cps/cse.scm (compute-always-available-expressions):
  (compute-equivalent-subexpressions): Adapt to effects analysis
  change.
* module/language/cps/dce.scm (compute-live-code): Likewise.
module/language/cps/cse.scm
module/language/cps/dce.scm
module/language/cps/effects-analysis.scm