]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/compiler/cfg/ssa/destruction/destruction-docs.factor
ui.listener: document that ~/.factor-history persists input history
[factor.git] / basis / compiler / cfg / ssa / destruction / destruction-docs.factor
index 1c10ca97acc5c3d218068e7518ccbfb093440ea5..86ea0fa06f06c706f51055c7b83d05dd9bf44a22 100644 (file)
@@ -1,34 +1,27 @@
 USING: compiler.cfg compiler.cfg.instructions
-compiler.cfg.ssa.destruction.private help.markup help.syntax ;
+compiler.cfg.ssa.destruction.private compiler.cfg.ssa.destruction.leaders
+compiler.cfg.ssa.interference help.markup help.syntax kernel sequences ;
 IN: compiler.cfg.ssa.destruction
 
-HELP: class-element-map
-{ $var-description "Maps leaders to equivalence class elements." } ;
-
 HELP: cleanup-cfg
 { $values { "cfg" cfg } }
-{ $description "In this step, " { $link ##parallel-copy } " instructions are substituted with more concreete " { $link ##copy } " instructions. " { $link ##phi } " instructions are removed here." } ;
-
-HELP: copies
-{ $var-description "Sequence of copies (tuples of { vreg-dst vreg-src}) that maybe can be eliminated later." }
-{ $see-also init-coalescing } ;
+{ $description "In this pass, useless copies are eliminated. " { $link ##phi } " instructions are removed and " { $link ##parallel-copy } " are transformed into regular " { $link ##copy } " instructions. Then for the copy instructions, which are ##copy and " { $link ##tagged>integer } " it is checked to see if the copy is useful. If it is not, the instruction is removed from the cfg." } ;
 
-HELP: maybe-eliminate-copy
-{ $values { "vreg1" "vreg" } { "vreg2" "vreg" } }
-{ $description "Eliminate a copy if possible." }
-{ $see-also must-eliminate-copy } ;
-
-HELP: must-eliminate-copy
-{ $values { "vreg1" "vreg" } { "vreg2" "vreg" } }
-{ $description "Eliminates a copy." }
-{ $see-also maybe-eliminate-copy } ;
+HELP: destruct-ssa
+{ $values { "cfg" cfg } }
+{ $description "Main entry point for the SSA destruction compiler pass." } ;
 
 ARTICLE: "compiler.cfg.ssa.destruction" "SSA Destruction"
+"SSA destruction compiler pass. It is preceded by " { $vocab-link "compiler.cfg.save-contexts" } " and followed by " { $vocab-link "compiler.cfg.linear-scan" } "."
+$nl
 "Because of the design of the register allocator, this pass has three peculiar properties."
 { $list
-  "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."
+  { "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. See " { $link leader-map } "." }
   { "Useless " { $link ##copy } " instructions, and all " { $link ##phi } " instructions, are eliminated, so the register allocator does not have to remove any redundant operations." }
   { "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." }
-} ;
+}
+$nl
+"Main entry point:"
+{ $subsections destruct-ssa } ;
 
 ABOUT: "compiler.cfg.ssa.destruction"