ghc-7.6.3: The GHC API

Safe Haskell | None

CmmNode

# Documentation

data CmmNode e x where

Constructors

CmmEntry :: !Label -> CmmNode C O |
CmmComment :: FastString -> CmmNode O O |
CmmAssign :: !CmmReg -> !CmmExpr -> CmmNode O O |
CmmStore :: !CmmExpr -> !CmmExpr -> CmmNode O O |
CmmUnsafeForeignCall :: ForeignTarget -> [CmmFormal] -> [CmmActual] -> CmmNode O O |
CmmBranch :: !Label -> CmmNode O C |
CmmCondBranch :: CmmExpr -> !Label -> !Label -> CmmNode O C |
Fields cml_pred :: CmmExpr cml_true :: !Label cml_false :: !Label
CmmSwitch :: CmmExpr -> [Maybe Label] -> CmmNode O C |
CmmCall :: CmmExpr -> Maybe Label -> [GlobalReg] -> ByteOff -> ByteOff -> ByteOff -> CmmNode O C |
Fields cml_target :: CmmExpr cml_cont :: Maybe Label cml_args_regs :: [GlobalReg] cml_args :: ByteOff cml_ret_args :: ByteOff cml_ret_off :: ByteOff
CmmForeignCall :: ForeignTarget -> [CmmFormal] -> [CmmActual] -> !Label -> UpdFrameOffset -> Bool -> CmmNode O C |
Fields tgt :: ForeignTarget res :: [CmmFormal] args :: [CmmActual] succ :: !Label updfr :: UpdFrameOffset intrbl :: Bool

Instances

NonLocal CmmNode |
Outputable CmmGraph |
Eq (CmmNode e x) |
Outputable (CmmNode e x) |
DefinerOfLocalRegs (CmmNode e x) |
UserOfLocalRegs (CmmNode e x) |
Outputable (Graph CmmNode e x) |
Outputable (Block CmmNode O O) |
Outputable (Block CmmNode O C) |
Outputable (Block CmmNode C O) |
Outputable (Block CmmNode C C) |

data ForeignHint

Constructors

NoHint |
AddrHint |
SignedHint |

Instances

Eq ForeignHint |
Outputable ForeignHint |

type CmmFormal = LocalReg

type CmmActual = CmmExpr

type UpdFrameOffset = ByteOff

data Convention

Constructors

NativeDirectCall |
NativeNodeCall |
NativeReturn |
Slow |
GC |
PrimOpCall |
PrimOpReturn |

Instances

Eq Convention |
Outputable Convention |

data ForeignConvention

Constructors

ForeignConvention CCallConv [ForeignHint] [ForeignHint] |

Instances

Eq ForeignConvention |
Outputable ForeignConvention |

data ForeignTarget

Constructors

ForeignTarget CmmExpr ForeignConvention |
PrimTarget CallishMachOp |

Instances

Eq ForeignTarget |
Outputable ForeignTarget |
UserOfLocalRegs ForeignTarget |

mapExp :: (CmmExpr -> CmmExpr) -> CmmNode e x -> CmmNode e x

mapExpDeep :: (CmmExpr -> CmmExpr) -> CmmNode e x -> CmmNode e x

wrapRecExp :: (CmmExpr -> CmmExpr) -> CmmExpr -> CmmExpr

foldExp :: (CmmExpr -> z -> z) -> CmmNode e x -> z -> z

foldExpDeep :: (CmmExpr -> z -> z) -> CmmNode e x -> z -> z

wrapRecExpf :: (CmmExpr -> z -> z) -> CmmExpr -> z -> z

mapExpM :: (CmmExpr -> Maybe CmmExpr) -> CmmNode e x -> Maybe (CmmNode e x)

mapExpDeepM :: (CmmExpr -> Maybe CmmExpr) -> CmmNode e x -> Maybe (CmmNode e x)

wrapRecExpM :: (CmmExpr -> Maybe CmmExpr) -> CmmExpr -> Maybe CmmExpr

mapSuccessors :: (Label -> Label) -> CmmNode O C -> CmmNode O C