Renamed CmmCPSData to CmmBrokenBlock and documented it
[ghc-hetmet.git] / compiler / cmm / Cmm.hs
index 00d93b0..7438750 100644 (file)
@@ -17,7 +17,7 @@ module Cmm (
        CmmReg(..), cmmRegRep,
        CmmLit(..), cmmLitRep,
        LocalReg(..), localRegRep,
-       BlockId(..),
+       BlockId(..), BlockEnv,
        GlobalReg(..), globalRegRep,
 
        node, nodeReg, spReg, hpReg, spLimReg
@@ -29,6 +29,7 @@ import MachOp
 import CLabel
 import ForeignCall
 import Unique
+import UniqFM
 import FastString
 
 import Data.Word
@@ -57,7 +58,7 @@ data GenCmmTop d i
   = CmmProc
      [d]              -- Info table, may be empty
      CLabel            -- Used to generate both info & entry labels
-     [LocalReg]        -- Argument locals live on entry (C-- procedure params)
+     CmmFormals        -- Argument locals live on entry (C-- procedure params)
      [GenBasicBlock i] -- Code, may be empty.  The first block is
                        -- the entry point.  The order is otherwise initially 
                        -- unimportant, but at some point the code gen will
@@ -131,10 +132,10 @@ data CmmStmt
        -- Undefined outside range, and when there's a Nothing
 
   | CmmJump CmmExpr               -- Jump to another function,
-    CmmActuals                    -- with these parameters.
+      CmmActuals                  -- with these parameters.
 
   | CmmReturn                     -- Return from a function,
-    CmmActuals                    -- with these return values.
+      CmmActuals                  -- with these return values.
 
 type CmmActuals = [(CmmExpr,MachHint)]
 type CmmFormals = [(CmmReg,MachHint)]
@@ -275,6 +276,8 @@ newtype BlockId = BlockId Unique
 instance Uniquable BlockId where
   getUnique (BlockId u) = u
 
+type BlockEnv a = UniqFM {- BlockId -} a
+
 -----------------------------------------------------------------------------
 --             Static Data
 -----------------------------------------------------------------------------