]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/compiler/cfg/ssa/destruction/coalescing/coalescing-docs.factor
compiler.cfg.ssa.destruction.coalescing: refactor and maybe a fix for #1308
[factor.git] / basis / compiler / cfg / ssa / destruction / coalescing / coalescing-docs.factor
index b082cae82a14dd8f4459c832079ce494472173ce..8c53329558b39b81af42c2809b3d7c3c2f3521b9 100644 (file)
@@ -14,14 +14,23 @@ HELP: coalesce-elements
 { $values { "merged" "??" } { "follower" "vreg" } { "leader" "vreg" } }
 { $description "Delete follower's class, and set leaders's class to merged." } ;
 
-HELP: coalesce-insn
+HELP: coalesce-now
 { $values { "insn" insn } }
-{ $description "Generic word supposed to be called in a " { $link make } " context which generates a list of eliminatable vreg copies. The word either eliminates copies immediately in case of " { $link ##phi } " and " { $link ##tagged>integer } " instructions or appends copies to the make sequence so that they are handled later by " { $link coalesce-cfg } "." } ;
+{ $description "Generic word which finds copy pairs in instructions and tries to eliminate them directly." }
+{ $see-also coalesce-later } ;
+
+HELP: coalesce-later
+{ $values { "insn" insn } }
+{ $description "Generic word supposed to be called in a " { $link make } " context which generates a list of eliminatable vreg copies. The copies are batched up and then eliminated by " { $link try-eliminate-copies } "." } ;
 
 HELP: coalesce-vregs
 { $values { "merged" "??" } { "follower" "vreg" } { "leader" "vreg" } }
 { $description "Sets 'leader' as the leader of 'follower'." } ;
 
+HELP: eliminatable-copy?
+{ $values { "vreg1" "vreg" } { "vreg2" "vreg" } }
+{ $description "Determines if a vreg copy can be eliminated. It can be eliminated if the vregs have the same register class and same representation size." } ;
+
 HELP: try-eliminate-copy
 { $values { "follower" "vreg" } { "leader" "vreg" } { "must?" boolean } }
 { $description "Tries to eliminate a vreg copy from 'leader' to 'follower'. If 'must?' is " { $link t } " then a " { $link vregs-shouldn't-interfere } " error is thrown if the vregs interfere." }
@@ -33,7 +42,7 @@ HELP: try-eliminate-copies
 { $see-also try-eliminate-copy } ;
 
 ARTICLE: "compiler.cfg.ssa.destruction.coalescing" "Vreg Coalescing"
-"This compiler pass eliminates redundant vreg copies."
+"This compiler pass eliminates redundant vreg copies. Coalescing occurs in two steps. First all redundant copies in all " { $link ##tagged>integer } " and " { $link ##phi } " instructions are handled. Then those in other instructions like " { $link vreg-insn } ", " { $link ##copy } " and " { $link ##parallel-copy } "."
 $nl
 "Main entry point:"
 { $subsections coalesce-cfg }