X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FOldCmm.hs;h=de1a8e0dcb1c454e2d892a49ee4d8b5c35f62335;hb=fa328fb3cbf09e767a35ecc2dd9811d6673882da;hp=57d458cc95e00d7d9478902ecbd35cb075b4727f;hpb=889c084e943779e76d19f2ef5e970ff655f511eb;p=ghc-hetmet.git diff --git a/compiler/cmm/OldCmm.hs b/compiler/cmm/OldCmm.hs index 57d458c..de1a8e0 100644 --- a/compiler/cmm/OldCmm.hs +++ b/compiler/cmm/OldCmm.hs @@ -14,7 +14,7 @@ module OldCmm ( cmmMapGraphM, cmmTopMapGraphM, GenBasicBlock(..), CmmBasicBlock, blockId, blockStmts, mapBlockStmts, CmmStmt(..), CmmReturnInfo(..), CmmHinted(..), - HintedCmmFormal, HintedCmmFormals, HintedCmmActual, HintedCmmActuals, + HintedCmmFormal, HintedCmmActual, CmmSafety(..), CmmCallTarget(..), module CmmDecl, module CmmExpr, @@ -144,12 +144,14 @@ data CmmStmt -- Old-style | CmmStore CmmExpr CmmExpr -- Assign to memory location. Size is -- given by cmmExprType of the rhs. - | CmmCall -- A call (forign, native or primitive), with + | CmmCall -- A call (foreign, native or primitive), with CmmCallTarget - HintedCmmFormals -- zero or more results - HintedCmmActuals -- zero or more arguments + [HintedCmmFormal] -- zero or more results + [HintedCmmActual] -- zero or more arguments CmmSafety -- whether to build a continuation CmmReturnInfo + -- Some care is necessary when handling the arguments of these, see + -- [Register parameter passing] and the hack in cmm/CmmOpt.hs | CmmBranch BlockId -- branch to another BB in this fn @@ -162,22 +164,20 @@ data CmmStmt -- Old-style -- Undefined outside range, and when there's a Nothing | CmmJump CmmExpr -- Jump to another C-- function, - HintedCmmActuals -- with these parameters. (parameters never used) + [HintedCmmActual] -- with these parameters. (parameters never used) | CmmReturn -- Return from a native C-- function, - HintedCmmActuals -- with these return values. (parameters never used) + [HintedCmmActual] -- with these return values. (parameters never used) data CmmHinted a = CmmHinted { hintlessCmm :: a, cmmHint :: ForeignHint } deriving( Eq ) -type HintedCmmActuals = [HintedCmmActual] -type HintedCmmFormals = [HintedCmmFormal] type HintedCmmFormal = CmmHinted CmmFormal type HintedCmmActual = CmmHinted CmmActual data CmmSafety = CmmUnsafe | CmmSafe C_SRT | CmmInterruptible --- | enable us to fold used registers over 'CmmActuals' and 'CmmFormals' +-- | enable us to fold used registers over '[CmmActual]' and '[CmmFormal]' instance UserOfLocalRegs CmmStmt where foldRegsUsed f (set::b) s = stmt s set where