Merging in the new codegen branch
[ghc-hetmet.git] / compiler / codeGen / CgMonad.lhs
index 55110c1..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
@@ -745,7 +747,7 @@ emitData sect lits
   where
     data_block = CmmData sect lits
 
-emitProc :: CmmInfo -> CLabel -> CmmFormalsWithoutKinds -> [CmmBasicBlock] -> Code
+emitProc :: CmmInfo -> CLabel -> CmmFormals -> [CmmBasicBlock] -> Code
 emitProc info lbl args blocks
   = do  { let proc_block = CmmProc info lbl args (ListGraph blocks)
        ; state <- getState
@@ -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