]> gitweb.factorcode.org Git - factor.git/blob - basis/compiler/cfg/ssa/destruction/destruction-docs.factor
compiler.cfg.*: even more compiler docs
[factor.git] / basis / compiler / cfg / ssa / destruction / destruction-docs.factor
1 USING: compiler.cfg compiler.cfg.instructions
2 compiler.cfg.ssa.destruction.private help.markup help.syntax ;
3 IN: compiler.cfg.ssa.destruction
4
5 HELP: cleanup-cfg
6 { $values { "cfg" cfg } }
7 { $description "In this step, " { $link ##parallel-copy } " instructions are substituted with more concreete " { $link ##copy } " instructions. " { $link ##phi } " instructions are removed here." } ;
8
9 ARTICLE: "compiler.cfg.ssa.destruction" "SSA Destruction"
10 "Because of the design of the register allocator, this pass has three peculiar properties."
11 { $list
12   "Instead of renaming vreg usages in the CFG, a map from vregs to canonical representatives is computed. This allows the register allocator to use the original SSA names to get reaching definitions."
13   { "Useless " { $link ##copy } " instructions, and all " { $link ##phi } " instructions, are eliminated, so the register allocator does not have to remove any redundant operations." }
14   { "This pass computes live sets and fills out the " { $slot "gc-roots" } " slots of GC maps with " { $vocab-link "compiler.cfg.liveness" } ", so the linear scan register allocator does not need to compute liveness again." }
15 } ;
16
17 ABOUT: "compiler.cfg.ssa.destruction"