compiler.cfg.*: more docs and removing a test that isn't relevant anymore

db4
Björn Lindqvist 2015-04-22 16:31:59 +02:00 committed by John Benediktsson
parent 17dff48402
commit 6215561ad4
7 changed files with 23 additions and 12 deletions

View File

@ -21,7 +21,7 @@ IN: bootstrap.compiler.timing
: machine-passes ( -- seq ) \ compiler.cfg.finalization:finalize-cfg passes ;
: linear-scan-passes ( -- seq ) \ compiler.cfg.linear-scan:(linear-scan) passes ;
: linear-scan-passes ( -- seq ) \ compiler.cfg.linear-scan:linear-scan passes ;
: all-passes ( -- seq )
[

View File

@ -18,7 +18,7 @@ HELP: <basic-block>
{ $description "Creates a new empty basic block. The " { $slot "id" } " slot is initialized with the value of the basic-block " { $link counter } "." } ;
HELP: <cfg>
{ $values { "entry" basic-block } { "word" word } { "label" "label" } { "cfg" cfg } }
{ $values { "word" word } { "label" "label" } { "entry" basic-block } { "cfg" cfg } }
{ $description "Constructor for " { $link cfg } ". " { $slot "spill-area-size" } " and " { $slot "spill-area-align" } " are set to default values." } ;
HELP: cfg

View File

@ -1,6 +1,12 @@
USING: compiler.cfg.linear-scan.live-intervals help.markup help.syntax ;
USING: compiler.cfg.linear-scan.allocation.state
compiler.cfg.linear-scan.live-intervals help.markup help.syntax ;
IN: compiler.cfg.linear-scan.allocation.spilling
HELP: assign-spill
{ $values { "live-interval" live-interval } }
{ $description "Assigns a spill slot for the live interval." }
{ $see-also assign-spill-slot } ;
HELP: spill-before
{ $values
{ "before" live-interval-state }

View File

@ -25,6 +25,11 @@ HELP: assign-registers-in-insn
{ $values { "insn" insn } }
{ $description "Assigns physical registers and spill slots for the virtual registers used by the instruction." } ;
HELP: compute-live-in
{ $values { "bb" basic-block } }
{ $description "" }
{ $see-also machine-live-ins } ;
HELP: machine-edge-live-ins
{ $var-description "Mapping from basic blocks to predecessors to values which are live on a particular incoming edge." } ;

View File

@ -27,6 +27,10 @@ HELP: live-interval-state
{ $slot "reg" }
{ "The allocated register, set in the " { $link allocate-registers } " step." }
}
{
{ $slot "spill-rep" }
{ "Representation the vreg will have when it is spilled." }
}
{
{ $slot "spill-to" }
{ { $link spill-slot } " to use for spilling, if it needs to be spilled." }

View File

@ -23,11 +23,3 @@ V{ } 2 test-bb
V{ } 10 insns>block [ process-block ] V{ } make
[ number>> ] map
] unit-test
! process-successor
{ V{ 10 } } [
<dlist> work-list set
HS{ } clone visited set
V{ } 10 insns>block process-successor
work-list get dlist>sequence [ number>> ] map
] unit-test

View File

@ -34,6 +34,10 @@ HELP: live-in?
{ $values { "vreg" "virtual register" } { "bb" basic-block } { "?" "a boolean" } }
{ $description "Whether the vreg is live in the block or not." } ;
HELP: live-ins
{ $var-description "Hash that maps from basic blocks to vregs that are live in them." }
{ $see-also compute-live-sets } ;
HELP: lookup-base-pointer
{ $values { "vreg" "vreg" } { "vreg/f" "vreg or " { $link f } } }
{ $description "Tries to figure out what the base pointer for a vreg is. Can't use cache here because of infinite recursion inside the quotation passed to cache" }