]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.cfg.*: more docs and removing a test that isn't relevant anymore
authorBjörn Lindqvist <bjourne@gmail.com>
Wed, 22 Apr 2015 14:31:59 +0000 (16:31 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 29 Apr 2015 16:31:59 +0000 (09:31 -0700)
basis/bootstrap/compiler/timing/timing.factor
basis/compiler/cfg/cfg-docs.factor
basis/compiler/cfg/linear-scan/allocation/spilling/spilling-docs.factor
basis/compiler/cfg/linear-scan/assignment/assignment-docs.factor
basis/compiler/cfg/linear-scan/live-intervals/live-intervals-docs.factor
basis/compiler/cfg/linearization/linearization-tests.factor
basis/compiler/cfg/liveness/liveness-docs.factor

index 199887f2a4cc958b89cb18218620b6c8c052503f..8b676234017a1edc0b3cf532bec221603cc8565c 100644 (file)
@@ -21,7 +21,7 @@ IN: bootstrap.compiler.timing
 
 : machine-passes ( -- seq ) \ compiler.cfg.finalization:finalize-cfg passes ;
 
-: linear-scan-passes ( -- seq ) \ compiler.cfg.linear-scan:(linear-scan) passes ;
+: linear-scan-passes ( -- seq ) \ compiler.cfg.linear-scan:linear-scan passes ;
 
 : all-passes ( -- seq )
     [
@@ -39,4 +39,4 @@ IN: bootstrap.compiler.timing
         \ compiler.cfg.liveness.ssa:compute-ssa-live-sets ,
     ] { } make ;
 
-all-passes [ [ reset ] [ add-timing ] bi ] each
\ No newline at end of file
+all-passes [ [ reset ] [ add-timing ] bi ] each
index a0a82bf2f20253c1bcd6b453ba1448b382a60fdb..10fa5b94403bf47245e944d06f8405b6b1e6af6f 100644 (file)
@@ -18,7 +18,7 @@ HELP: <basic-block>
 { $description "Creates a new empty basic block. The " { $slot "id" } " slot is initialized with the value of the basic-block " { $link counter } "." } ;
 
 HELP: <cfg>
-{ $values { "entry" basic-block } { "word" word } { "label" "label" } { "cfg" cfg } }
+{ $values { "word" word } { "label" "label" } { "entry" basic-block } { "cfg" cfg } }
 { $description "Constructor for " { $link cfg } ". " { $slot "spill-area-size" } " and " { $slot "spill-area-align" } " are set to default values." } ;
 
 HELP: cfg
index 3b05a3e8f45efc10d031e8fd8d6f91ae646ba0ad..6fad4bab0b96ec5afde867d584657ba9c2023a33 100644 (file)
@@ -1,6 +1,12 @@
-USING: compiler.cfg.linear-scan.live-intervals help.markup help.syntax ;
+USING: compiler.cfg.linear-scan.allocation.state
+compiler.cfg.linear-scan.live-intervals help.markup help.syntax ;
 IN: compiler.cfg.linear-scan.allocation.spilling
 
+HELP: assign-spill
+{ $values { "live-interval" live-interval } }
+{ $description "Assigns a spill slot for the live interval." }
+{ $see-also assign-spill-slot } ;
+
 HELP: spill-before
 { $values
   { "before" live-interval-state }
index bd6daaf427e07d6a939d44e44fa7becde66161d9..bf288e1d42631fd5efcc5c6a63cdc602cee05099 100644 (file)
@@ -25,6 +25,11 @@ HELP: assign-registers-in-insn
 { $values { "insn" insn } }
 { $description "Assigns physical registers and spill slots for the virtual registers used by the instruction." } ;
 
+HELP: compute-live-in
+{ $values { "bb" basic-block } }
+{ $description "" }
+{ $see-also machine-live-ins } ;
+
 HELP: machine-edge-live-ins
 { $var-description "Mapping from basic blocks to predecessors to values which are live on a particular incoming edge." } ;
 
index 0fdeb219f43276e251314030aab866c907cb9165..f27e0dced09930ff9ce9b5c8fc18a78ec3d3ef53 100644 (file)
@@ -27,6 +27,10 @@ HELP: live-interval-state
         { $slot "reg" }
         { "The allocated register, set in the " { $link allocate-registers } " step." }
     }
+    {
+        { $slot "spill-rep" }
+        { "Representation the vreg will have when it is spilled." }
+    }
     {
         { $slot "spill-to" }
         { { $link spill-slot } " to use for spilling, if it needs to be spilled." }
index 6fcef868e262d23f9abeb858fd28ece4e4a7d54b..93b5b86d74d1cb2bf326eb6739852a4454fa5b39 100644 (file)
@@ -23,11 +23,3 @@ V{ } 2 test-bb
     V{ } 10 insns>block [ process-block ] V{ } make
     [ number>> ] map
 ] unit-test
-
-! process-successor
-{ V{ 10 } } [
-    <dlist> work-list set
-    HS{ } clone visited set
-    V{ } 10 insns>block process-successor
-    work-list get dlist>sequence [ number>> ] map
-] unit-test
index db40cb60de7876ffbd5d12229b26508c9ccf38ba..fea54c076016f155013c163920e4b3cc54a363df 100644 (file)
@@ -34,6 +34,10 @@ HELP: live-in?
 { $values { "vreg" "virtual register" } { "bb" basic-block } { "?" "a boolean" } }
 { $description "Whether the vreg is live in the block or not." } ;
 
+HELP: live-ins
+{ $var-description "Hash that maps from basic blocks to vregs that are live in them." }
+{ $see-also compute-live-sets } ;
+
 HELP: lookup-base-pointer
 { $values { "vreg" "vreg" } { "vreg/f" "vreg or " { $link f } } }
 { $description "Tries to figure out what the base pointer for a vreg is. Can't use cache here because of infinite recursion inside the quotation passed to cache" }