ghc-7.4.2: 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 -> ByteOff -> ByteOff -> ByteOff -> CmmNode O C |

Fields

cml_target :: CmmExpr
cml_cont :: Maybe Label
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

HooplNode CmmNode |
NonLocal CmmNode |
PlatformOutputable CmmGraph |
Eq (CmmNode e x) |
PlatformOutputable (CmmNode e x) |
DefinerOfSlots (CmmNode e x) |
UserOfSlots (CmmNode e x) |
DefinerOfLocalRegs (CmmNode e x) |
UserOfLocalRegs (CmmNode e x) |
PlatformOutputable (Block CmmNode O O) |
PlatformOutputable (Block CmmNode O C) |
PlatformOutputable (Block CmmNode C O) |
PlatformOutputable (Block CmmNode C C) |
PlatformOutputable (Graph CmmNode e x) |

data ForeignHint

Constructors

NoHint |
AddrHint |
SignedHint |

Instances

Eq ForeignHint |
PlatformOutputable ForeignHint |
Outputable ForeignHint |

type CmmFormal = LocalReg

type CmmActual = CmmExpr

type UpdFrameOffset = ByteOff

data Convention

Constructors

NativeDirectCall |
NativeNodeCall |
NativeReturn |
Slow |
GC |
PrimOpCall |
PrimOpReturn |
Foreign ForeignConvention |
Private |

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 |
PlatformOutputable ForeignTarget |
UserOfSlots 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