compiler.*: more compiler docs
parent
91118ae5df
commit
f37ab939f0
|
@ -1,9 +1,15 @@
|
|||
USING: help.markup help.syntax sequences ;
|
||||
USING: compiler.tree help.markup help.syntax kernel sequences ;
|
||||
IN: compiler.tree.cleanup
|
||||
|
||||
ARTICLE: "compiler.tree.cleanup" "Cleanup Phase"
|
||||
"A phase run after propagation to finish the job, so to speak. Codifies speculative inlining decisions, deletes branches marked as never taken, and flattens local recursive blocks that do not call themselves." ;
|
||||
HELP: cleanup-folding?
|
||||
{ $values { "#call" #call } { "?" boolean } }
|
||||
{ $description "Checks if a " { $link #call } " node can be folded." } ;
|
||||
|
||||
HELP: cleanup-tree
|
||||
{ $values { "nodes" sequence } { "nodes'" sequence } }
|
||||
{ $description "Main entry point for the cleanup-tree optimization phase." } ;
|
||||
|
||||
ARTICLE: "compiler.tree.cleanup" "Cleanup Phase"
|
||||
"A phase run after propagation to finish the job, so to speak. Codifies speculative inlining decisions, deletes branches marked as never taken, and flattens local recursive blocks that do not call themselves." ;
|
||||
|
||||
ABOUT: "compiler.tree.cleanup"
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
USING: help.markup help.syntax ;
|
||||
IN: compiler.tree.dead-code
|
||||
|
||||
ARTICLE: "compiler.tree.dead-code" "Dead code elimination" "In this compiler pass, nodes that have no effect on the words output are removed." ;
|
||||
|
||||
ABOUT: "compiler.tree.dead-code"
|
|
@ -1,6 +1,14 @@
|
|||
USING: compiler.tree help.markup help.syntax sequences ;
|
||||
IN: compiler.tree.propagation.info
|
||||
|
||||
HELP: node-input-infos
|
||||
{ $values { "node" node } { "seq" sequence } }
|
||||
{ $description "Lists the value infos for the input variables of an SSA tree node." } ;
|
||||
|
||||
HELP: node-output-infos
|
||||
{ $values { "node" node } { "seq" sequence } }
|
||||
{ $description "Lists the value infos for the output variables of an SSA tree node." } ;
|
||||
|
||||
HELP: value-info-state
|
||||
{ $class-description "Represents constraints the compiler knows about the input and output variables to an SSA tree node. It has the following slots:"
|
||||
{ $table
|
||||
|
@ -12,10 +20,5 @@ HELP: value-info-state
|
|||
}
|
||||
} ;
|
||||
|
||||
HELP: node-input-infos
|
||||
{ $values { "node" node } { "seq" sequence } }
|
||||
{ $description "Lists the value infos for the input variables of an SSA tree node." } ;
|
||||
|
||||
HELP: node-output-infos
|
||||
{ $values { "node" node } { "seq" sequence } }
|
||||
{ $description "Lists the value infos for the output variables of an SSA tree node." } ;
|
||||
HELP: value-infos
|
||||
{ $var-description "Assoc stack of current value --> info mapping" } ;
|
||||
|
|
|
@ -286,7 +286,6 @@ DEFER: (value-info-union)
|
|||
]
|
||||
} cond ;
|
||||
|
||||
! Assoc stack of current value --> info mapping
|
||||
SYMBOL: value-infos
|
||||
|
||||
: value-info* ( value -- info ? )
|
||||
|
|
|
@ -50,3 +50,8 @@ HELP: propagate
|
|||
{ $description "Performs the propagation pass of the AST optimization. All nodes info slots are initialized here." }
|
||||
{ $examples { $unchecked-example $[ propagate-ex ] }
|
||||
} ;
|
||||
|
||||
ARTICLE: "compiler.tree.propagation" "Class, interval, constant propagation"
|
||||
"This pass must be run after " { $vocab-link "compiler.tree.normalization" } "." ;
|
||||
|
||||
ABOUT: "compiler.tree.propagation"
|
||||
|
|
|
@ -16,8 +16,6 @@ compiler.tree.propagation.transforms
|
|||
kernel namespaces ;
|
||||
IN: compiler.tree.propagation
|
||||
|
||||
! This pass must run after normalization
|
||||
|
||||
: propagate ( nodes -- nodes )
|
||||
H{ } clone copies set
|
||||
H{ } clone 1array value-infos set
|
||||
|
|
|
@ -292,7 +292,7 @@ HELP: stack-cleanup
|
|||
|
||||
HELP: gc-root-offset
|
||||
{ $values { "spill-slot" spill-slot } { "n" integer } }
|
||||
{ $description "Offset in the " { $link stack-frame } " for the word being constructed where the spill slot is located, in " { $link cell } " units." }
|
||||
{ $description "Offset in the " { $link stack-frame } " for the word being constructed where the spill slot is located. The value is given in " { $link cell } " units." }
|
||||
{ $see-also vm:gc-info } ;
|
||||
|
||||
ARTICLE: "cpu.architecture" "CPU architecture description model"
|
||||
|
@ -323,4 +323,14 @@ $nl
|
|||
widen-vector-rep
|
||||
}
|
||||
"Slot access:"
|
||||
{ $subsections %write-barrier } ;
|
||||
{ $subsections
|
||||
%set-slot
|
||||
%set-slot-imm
|
||||
%slot
|
||||
%slot-imm
|
||||
%write-barrier
|
||||
}
|
||||
"Spilling:"
|
||||
{ $subsections gc-root-offset } ;
|
||||
|
||||
ABOUT: "cpu.architecture"
|
||||
|
|
Loading…
Reference in New Issue