]> gitweb.factorcode.org Git - factor.git/commitdiff
minor SSA liveness code reorganization
authorDaniel Ehrenberg <littledan@Macintosh-122.local>
Sun, 2 Aug 2009 22:05:51 +0000 (18:05 -0400)
committerDaniel Ehrenberg <littledan@Macintosh-122.local>
Sun, 2 Aug 2009 22:05:51 +0000 (18:05 -0400)
basis/compiler/cfg/ssa/liveness/liveness.factor

index 8788bc72f5f4a59378a01bf19ee0163a929a064e..f2a195eb243599a49d1672c16803380ef64630a2 100644 (file)
@@ -97,31 +97,15 @@ SYMBOL: phi-outs
     H{ } T_q-sets set
     [ next-T_q drop ] each-basic-block ;
 
-:: compute-phi-uses ( cfg -- )
-    ! Here, a phi node uses its argument in the block that it comes from.
-    H{ } clone :> use
-    cfg [| block |
-        block instructions>> [
-            dup ##phi?
-            [ inputs>> [ use conjoin-at ] assoc-each ]
-            [ uses-vregs [ block swap use conjoin-at ] each ]
-            if
-        ] each
-    ] each-basic-block
-    use [ keys ] assoc-map uses set ;
-
 PRIVATE>
 
 : precompute-liveness ( cfg -- )
-    ! The first three of these depend only on the graph
-    ! structure of the CFG, and don't need to be recomputed
-    ! if that doesn't change
+    ! Maybe dominance and def-use should be called before this, separately
     {
+        [ compute-dominance ]
+        [ compute-def-use ]
         [ compute-R_q ]
         [ compute-T_q ]
-        [ compute-dominance ]
-        [ compute-defs ]
-        [ compute-phi-uses ]
     } cleave ;
 
 <PRIVATE