1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-17 21:12:25 +02:00
guile/module/language/cps
Andy Wingo 987c1f5ff3 Rewrite slot allocation pass
* module/language/cps/slot-allocation.scm ($allocation): Refactor
  internal format of allocations.  Instead of an allocation being a hash
  table of small $allocation objects, it is an $allocation object that
  contains packed vectors.
  (find-first-trailing-zero): Rework to not need a maximum.
  (lookup-maybe-slot): New interface.
  (lookup-slot): Raise an error if a var has no slot.
  (lookup-call-allocation): New helper.
  (lookup-constant-value, lookup-maybe-constant-value):
  (lookup-call-proc-slot, lookup-parallel-moves): Adapt to $allocation
  change

  (allocate-slots): Rewrite so that instead of being recursive, it
  traverses the blocks in CFA order.  Also, procedure call frames are
  now allocated with respect to the live set after using arguments (and
  killing any dead-after-use vars); this should make call frames more
  compact but it does necessitate a parallel move solution.  Therefore
  parallel moves are recorded for all calls, for arguments; also if the
  continuation is a $ktrunc, the continuation gets parallel moves for
  the results.

  This rewrite is in preparation to allocating call args directly in the
  appropriate slots, where possible.

* module/language/cps/compile-rtl.scm (compile-fun): Adapt to slot
  allocation changes, using lookup-maybe-slot where appropriate,
  performing parallel moves when calling functions, and expecting return
  moves to be associated with $ktrunc continuations.
2013-11-15 11:17:18 +01:00
..
arities.scm Replace ($var sym) with ($values (sym)). 2013-11-13 20:55:28 +01:00
closure-conversion.scm Replace ($var sym) with ($values (sym)). 2013-11-13 20:55:28 +01:00
compile-rtl.scm Rewrite slot allocation pass 2013-11-15 11:17:18 +01:00
constructors.scm Source information goes on the $continue, not the $cont. 2013-11-07 10:32:21 +01:00
contification.scm Fix arity selection in compute-contification 2013-11-08 10:59:52 +01:00
dfg.scm Replace ($var sym) with ($values (sym)). 2013-11-13 20:55:28 +01:00
elide-values.scm Source information goes on the $continue, not the $cont. 2013-11-07 10:32:21 +01:00
primitives.scm RTL compiler supports static bitvectors 2013-11-03 21:48:48 +01:00
reify-primitives.scm Source information goes on the $continue, not the $cont. 2013-11-07 10:32:21 +01:00
slot-allocation.scm Rewrite slot allocation pass 2013-11-15 11:17:18 +01:00
spec.scm Add CPS -> RTL compiler 2013-08-31 09:40:56 +02:00
specialize-primcalls.scm Add specialize-primcalls pass; bump objcode version. 2013-11-10 19:27:19 +01:00
verify.scm Replace ($var sym) with ($values (sym)). 2013-11-13 20:55:28 +01:00