compiler.cfg.linear-scan.*: stub docs and tests

db4
Björn Lindqvist 2014-11-16 12:12:14 +01:00 committed by John Benediktsson
parent 3b86d4b9ba
commit d3c91bea72
4 changed files with 17 additions and 5 deletions

View File

@ -130,7 +130,6 @@ SYMBOL: unhandled-intervals
! Minheap of sync points which still need to be processed
SYMBOL: unhandled-sync-points
! Mapping from vregs to spill slots
SYMBOL: spill-slots
: assign-spill-slot ( coalesced-vreg rep -- spill-slot )

View File

@ -7,8 +7,13 @@ HELP: assign-registers-in-insn
HELP: assign-gc-roots
{ $values { "gc-map" gc-map } }
{ $description "Assigns spill slots for all gc roots in a gc map." }
{ $see-also spill-slot } ;
{ $description "Assigns spill slots for all gc roots in a gc map." } ;
HELP: assign-derived-roots
{ $values { "gc-map" gc-map } }
{ $description "Assigns pairs of spill slots for all derived roots in a gc map." } ;
{ assign-gc-roots assign-derived-roots } related-words
HELP: vreg>reg
{ $values { "vreg" "virtaul register" } { "reg" "register" } }

View File

@ -0,0 +1,10 @@
USING: compiler.cfg.instructions compiler.cfg.linear-scan.assignment
compiler.cfg.linear-scan.live-intervals cpu.x86.assembler.operands make
tools.test ;
IN: compiler.cfg.linear-scan.assignment.tests
{ { T{ ##spill { src RAX } } } } [
[
T{ live-interval-state { vreg 1234 } { reg RAX } } insert-spill
] { } make
] unit-test

View File

@ -31,8 +31,6 @@ SYMBOL: pending-interval-assoc
vreg>> pending-interval-assoc get delete-at ;
:: vreg>reg ( vreg -- reg )
! If a live vreg is not in the pending set, then it must
! have been spilled.
vreg leader :> leader
leader pending-interval-assoc get at* [
drop leader vreg rep-of lookup-spill-slot