Merging in the new codegen branch
[ghc-hetmet.git] / compiler / codeGen / CgMonad.lhs
index 7b2ee7d..e624f4b 100644 (file)
@@ -70,9 +70,11 @@ import {-# SOURCE #-} CgBindery ( CgBindings, nukeVolatileBinds )
 
 import DynFlags
 import PackageConfig
+import BlockId
 import Cmm
 import CmmUtils
 import CLabel
+import PprCmm
 import StgSyn (SRT)
 import SMRep
 import Module
@@ -712,8 +714,8 @@ labelC :: BlockId -> Code
 labelC id = emitCgStmt (CgLabel id)
 
 newLabelC :: FCode BlockId
-newLabelC = do { us <- newUniqSupply
-               ; return $ initUs_ us (freshBlockId "LabelC") }
+newLabelC = do { u <- newUnique
+               ; return $ BlockId u }
 
 checkedAbsC :: CmmStmt -> Code
 -- Emit code, eliminating no-ops
@@ -766,7 +768,8 @@ getCmm code
   = do { state1 <- getState
        ; ((), state2) <- withState code (state1 { cgs_tops  = nilOL })
        ; setState $ state2 { cgs_tops = cgs_tops state1 } 
-       ; return (Cmm (fromOL (cgs_tops state2))) }
+       ; return (Cmm (fromOL (cgs_tops state2))) 
+        }
 
 -- ----------------------------------------------------------------------------
 -- CgStmts