tightened some dataflow code as part of preparing a talk
[ghc-hetmet.git] / compiler / cmm / ZipDataflow.hs
index c09a57e..efe9365 100644 (file)
@@ -17,7 +17,7 @@ where
 
 import CmmTx
 import DFMonad
-import ZipCfg hiding (freshBlockId) -- use version from DFMonad
+import ZipCfg
 import qualified ZipCfg as G
 
 import Outputable
@@ -28,6 +28,8 @@ import UniqSupply
 import Control.Monad
 import Maybe
 
+#include "HsVersions.h"
+
 {-
 
 \section{A very polymorphic infrastructure for dataflow problems}
@@ -296,8 +298,7 @@ refine_b_anal comp graph initial =
     set_block_fact () b@(G.Block id _) =              
       let (h, l) = G.goto_end (G.unzip b) in
       do  env <- factsEnv
-          let block_in = head_in h (last_in comp env l) -- 'in' fact for the block
-          setFact id block_in 
+          setFact id $ head_in h (last_in comp env l) -- 'in' fact for the block
     head_in (G.ZHead h m) out = head_in h (bc_middle_in comp out m)
     head_in (G.ZFirst id) out = bc_first_in comp out id
 
@@ -421,7 +422,7 @@ labelGraph id (Graph tail blocks) = LGraph id (insertBlock (Block id tail) block
 
 remove_entry_label :: LGraph m l -> Graph m l
 remove_entry_label g =
-    let FGraph e (ZBlock (ZFirst id tail)) others = entry g
+    let FGraph e (ZBlock (ZFirst id) tail) others = entry g
     in  ASSERT (id == e) Graph tail others
 
 {-
@@ -857,3 +858,7 @@ subAnalysis' m =
          return a }
   where pprFacts env = nest 2 $ vcat $ map pprFact $ ufmToList env
         pprFact (id, a) = hang (ppr id <> colon) 4 (ppr a)
+
+
+_unused :: FS.FastString
+_unused = undefined