compiler.cfg.*: more docs and removing a test that isn't relevant anymore
parent
17dff48402
commit
6215561ad4
|
@ -21,7 +21,7 @@ IN: bootstrap.compiler.timing
|
||||||
|
|
||||||
: machine-passes ( -- seq ) \ compiler.cfg.finalization:finalize-cfg passes ;
|
: 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 )
|
: all-passes ( -- seq )
|
||||||
[
|
[
|
||||||
|
@ -39,4 +39,4 @@ IN: bootstrap.compiler.timing
|
||||||
\ compiler.cfg.liveness.ssa:compute-ssa-live-sets ,
|
\ compiler.cfg.liveness.ssa:compute-ssa-live-sets ,
|
||||||
] { } make ;
|
] { } make ;
|
||||||
|
|
||||||
all-passes [ [ reset ] [ add-timing ] bi ] each
|
all-passes [ [ reset ] [ add-timing ] bi ] each
|
||||||
|
|
|
@ -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 } "." } ;
|
{ $description "Creates a new empty basic block. The " { $slot "id" } " slot is initialized with the value of the basic-block " { $link counter } "." } ;
|
||||||
|
|
||||||
HELP: <cfg>
|
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." } ;
|
{ $description "Constructor for " { $link cfg } ". " { $slot "spill-area-size" } " and " { $slot "spill-area-align" } " are set to default values." } ;
|
||||||
|
|
||||||
HELP: cfg
|
HELP: cfg
|
||||||
|
|
|
@ -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
|
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
|
HELP: spill-before
|
||||||
{ $values
|
{ $values
|
||||||
{ "before" live-interval-state }
|
{ "before" live-interval-state }
|
||||||
|
|
|
@ -25,6 +25,11 @@ HELP: assign-registers-in-insn
|
||||||
{ $values { "insn" insn } }
|
{ $values { "insn" insn } }
|
||||||
{ $description "Assigns physical registers and spill slots for the virtual registers used by the instruction." } ;
|
{ $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
|
HELP: machine-edge-live-ins
|
||||||
{ $var-description "Mapping from basic blocks to predecessors to values which are live on a particular incoming edge." } ;
|
{ $var-description "Mapping from basic blocks to predecessors to values which are live on a particular incoming edge." } ;
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,10 @@ HELP: live-interval-state
|
||||||
{ $slot "reg" }
|
{ $slot "reg" }
|
||||||
{ "The allocated register, set in the " { $link allocate-registers } " step." }
|
{ "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" }
|
{ $slot "spill-to" }
|
||||||
{ { $link spill-slot } " to use for spilling, if it needs to be spilled." }
|
{ { $link spill-slot } " to use for spilling, if it needs to be spilled." }
|
||||||
|
|
|
@ -23,11 +23,3 @@ V{ } 2 test-bb
|
||||||
V{ } 10 insns>block [ process-block ] V{ } make
|
V{ } 10 insns>block [ process-block ] V{ } make
|
||||||
[ number>> ] map
|
[ number>> ] map
|
||||||
] unit-test
|
] 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
|
|
||||||
|
|
|
@ -34,6 +34,10 @@ HELP: live-in?
|
||||||
{ $values { "vreg" "virtual register" } { "bb" basic-block } { "?" "a boolean" } }
|
{ $values { "vreg" "virtual register" } { "bb" basic-block } { "?" "a boolean" } }
|
||||||
{ $description "Whether the vreg is live in the block or not." } ;
|
{ $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
|
HELP: lookup-base-pointer
|
||||||
{ $values { "vreg" "vreg" } { "vreg/f" "vreg or " { $link f } } }
|
{ $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" }
|
{ $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" }
|
||||||
|
|
Loading…
Reference in New Issue