DFG refactor to allow dominator tree construction
authorAndy Wingo <wingo@pobox.com>
Thu, 10 Oct 2013 10:42:50 +0000 (12:42 +0200)
committerAndy Wingo <wingo@pobox.com>
Thu, 10 Oct 2013 10:42:50 +0000 (12:42 +0200)
commitf22979db66fb54388188ac27abd6ef59862e170b
treec7db6888e5352ee4ddb769046314980bc7f0e0c5
parent6b71a7671355f22553f75e92b25e79d9bbca2154
DFG refactor to allow dominator tree construction

* module/language/cps/dfg.scm: Refactor so that we can think about
  building a dominator tree.  Split continuations out of use maps and
  put them in a separate table, which will have more flow information.
  (visit-fun): Mark clauses as using their bodies.
  (lookup-predecessors, lookup-successors): New exports.
  (find-defining-expression): Add an exception for clauses, now that
  clauses are in the flow graph.
  (continuation-bound-in?): Rename from variable-bound-in?, as it can
  currently only be used for continuations.

* module/language/cps/contification.scm (contify): Adapt to use
  lookup-predecessors and continuation-bound-in?.
module/language/cps/contification.scm
module/language/cps/dfg.scm