]> gitweb.factorcode.org Git - factor.git/blob - basis/compiler/cfg/ssa/construction/construction-docs.factor
Fixes #2966
[factor.git] / basis / compiler / cfg / ssa / construction / construction-docs.factor
1 USING: compiler.cfg compiler.cfg.instructions
2 compiler.cfg.ssa.construction.private help.markup help.syntax ;
3 IN: compiler.cfg.ssa.construction
4
5 HELP: <##phi>
6 { $values { "vreg" "vreg" } { "bb" basic-block } { "##phi" ##phi } }
7 { $description "Creates a new " { $link ##phi } " instruction given a vreg and a basic block." } ;
8
9 HELP: phis
10 { $var-description "Maps vregs to " { $link ##phi } " instructions." } ;
11
12 HELP: used-vregs
13 { $var-description "Worklist of used vregs, to calculate used phis." } ;
14
15 HELP: defs
16 { $var-description "Maps vregs to sets of basic blocks." } ;
17
18 HELP: defs-multi
19 { $var-description "Set of vregs defined in more than one basic block." } ;
20
21 HELP: inserting-phis
22 { $var-description "Maps basic blocks to sequences of " { $link ##phi } " instructions." } ;
23
24 HELP: pushed
25 { $var-description "Maps vregs to renaming stacks." } ;
26
27 HELP: stacks
28 { $var-description "Maps vregs to renaming stacks." } ;
29
30 ARTICLE: "compiler.cfg.ssa.construction" "SSA construction"
31 "Iterated dominance frontiers are computed using the DJ Graph method in " { $vocab-link "compiler.cfg.ssa.construction.tdmsc" } "."
32 $nl
33 "The renaming algorithm is based on \"Practical Improvements to the Construction and Destruction of Static Single Assignment Form\"."
34 $nl
35 "We construct pruned SSA without computing live sets, by building a dependency graph for phi instructions, marking the transitive closure of a vertex as live if it is referenced by some non-phi instruction. Thanks to Cameron Zwarich for the trick."
36 $nl
37 "http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.49.9683" ;
38
39 ABOUT: "compiler.cfg.ssa.construction"