compiler.cfg.*: more compiler docs
parent
e968c16139
commit
2ccbcd6af6
|
@ -1,6 +1,6 @@
|
|||
USING: assocs compiler.cfg compiler.cfg.builder.blocks
|
||||
compiler.cfg.stacks.local compiler.tree help.markup help.syntax literals math
|
||||
multiline sequences words ;
|
||||
multiline sequences vectors words ;
|
||||
IN: compiler.cfg.builder
|
||||
|
||||
<<
|
||||
|
@ -42,7 +42,7 @@ H{
|
|||
>>
|
||||
|
||||
HELP: procedures
|
||||
{ $var-description "Used as a temporary storage for the current cfg during construction of all cfgs." } ;
|
||||
{ $var-description "A " { $link vector } " used as temporary storage during cfg construction for all procedures being built." } ;
|
||||
|
||||
HELP: make-input-map
|
||||
{ $values { "#shuffle" #shuffle } { "assoc" assoc } }
|
||||
|
|
|
@ -3,7 +3,7 @@ IN: compiler.cfg.stacks.height
|
|||
|
||||
HELP: record-stack-heights
|
||||
{ $values { "ds-height" number } { "rs-height" number } { "bb" basic-block } }
|
||||
{ $description "Does something." } ;
|
||||
{ $description "Sets the data and retain stack heights in relation to the cfg of this basic block." } ;
|
||||
|
||||
HELP: ds-heights
|
||||
{ $var-description "Assoc that records the data stacks height at the entry of each " { $link basic-block } "." } ;
|
||||
|
|
|
@ -31,3 +31,14 @@ HELP: emit-height-changes
|
|||
"{ T{ ##inc-d { n 4 } } T{ ##inc-r { n -2 } } }"
|
||||
}
|
||||
} ;
|
||||
|
||||
ARTICLE: "compiler.cfg.stacks.local" "Local stack analysis"
|
||||
"Local stack analysis. We build three sets for every basic block in the CFG:"
|
||||
{ $list
|
||||
"peek-set: all stack locations that the block reads before writing"
|
||||
"replace-set: all stack locations that the block writes"
|
||||
"kill-set: all stack locations which become unavailable after the block ends because of the stack height being decremented" }
|
||||
"This is done while constructing the CFG." ;
|
||||
|
||||
|
||||
ABOUT: "compiler.cfg.stacks.local"
|
||||
|
|
|
@ -7,14 +7,6 @@ math math.order namespaces sequences sets ;
|
|||
FROM: namespaces => set ;
|
||||
IN: compiler.cfg.stacks.local
|
||||
|
||||
! Local stack analysis. We build three sets for every basic block
|
||||
! in the CFG:
|
||||
! - peek-set: all stack locations that the block reads before writing
|
||||
! - replace-set: all stack locations that the block writes
|
||||
! - kill-set: all stack locations which become unavailable after the
|
||||
! block ends because of the stack height being decremented
|
||||
! This is done while constructing the CFG.
|
||||
|
||||
SYMBOLS: peek-sets replace-sets kill-sets ;
|
||||
|
||||
SYMBOL: locs>vregs
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
USING: compiler.cfg.stacks.local help.markup help.syntax math sequences ;
|
||||
USING: compiler.cfg.stacks.local compiler.tree help.markup help.syntax math
|
||||
sequences ;
|
||||
IN: compiler.cfg.stacks
|
||||
|
||||
HELP: ds-push
|
||||
{ $values { "vreg" "a virtual register" } }
|
||||
{ $description "Used when translating the " { $link #push } " SSA node to CFG form for pushing a literal value onto the data stack." } ;
|
||||
|
||||
HELP: begin-stack-analysis
|
||||
{ $description "Initializes a set of variables related to stack analysis of Factor words." }
|
||||
{ $see-also current-height } ;
|
||||
|
|
Loading…
Reference in New Issue