CSE does scalar replacement of aggregates
authorAndy Wingo <wingo@pobox.com>
Fri, 2 May 2014 15:47:20 +0000 (17:47 +0200)
committerAndy Wingo <wingo@pobox.com>
Fri, 2 May 2014 15:47:20 +0000 (17:47 +0200)
commit6119a9059543e1985b8dd504e70d7a690db62ec2
tree26f7bf74e9ef29d57fec06ca003ca9958863b35f
parentcfb42b4c8a391446fc6c2a8c41dfd8ad0489fda7
CSE does scalar replacement of aggregates

* module/language/cps/effects-analysis.scm (effects-clobber): New
  helper.
  (length): Only depend on &cdr.
  (synthesize-definition-effects!): New interface.

* module/language/cps/cse.scm (compute-available-expressions): Don't
  count out constructors here -- we'll do that below.
  (compute-defs): Add a comment.
  (compute-equivalent-subexpressions): Synthesize getter calls at
  constructor/setter sites, so that (set-car! x y) can cause a
  future (car x) to just reference y.  The equiv-labels set now stores
  the defined vars, so there is no need for the defs vector.
  (cse, apply-cse): Adapt to compute-equivalent-subexpressions change.
module/language/cps/cse.scm
module/language/cps/effects-analysis.scm