ghc-7.4.2: The GHC API

Safe Haskell | None

StgCmmMonad

# Documentation

data FCode a

Instances

Monad FCode |

initC :: DynFlags -> Module -> FCode a -> IO a

thenC :: FCode () -> FCode a -> FCode a

thenFC :: FCode a -> (a -> FCode c) -> FCode c

listCs :: [FCode ()] -> FCode ()

listFCs :: [FCode a] -> FCode [a]

mapCs :: (a -> FCode ()) -> [a] -> FCode ()

mapFCs :: (a -> FCode b) -> [a] -> FCode [b]

returnFC :: a -> FCode a

fixC :: (a -> FCode a) -> FCode a

fixC_ :: (a -> FCode a) -> FCode ()

nopC :: FCode ()

whenC :: Bool -> FCode () -> FCode ()

newUnique :: FCode Unique

newUniqSupply :: FCode UniqSupply

emit :: CmmAGraph -> FCode ()

emitDecl :: CmmDecl -> FCode ()

emitProc :: CmmInfoTable -> CLabel -> [CmmFormal] -> CmmAGraph -> FCode ()

emitProcWithConvention :: Convention -> CmmInfoTable -> CLabel -> [CmmFormal] -> CmmAGraph -> FCode ()

emitSimpleProc :: CLabel -> CmmAGraph -> FCode ()

getCmm :: FCode () -> FCode CmmGroup

cgStmtsToBlocks :: CmmAGraph -> FCode CmmGraph

getCodeR :: FCode a -> FCode (a, CmmAGraph)

getCode :: FCode a -> FCode CmmAGraph

getHeapUsage :: (VirtualHpOffset -> FCode a) -> FCode a

forkClosureBody :: FCode () -> FCode ()

forkStatics :: FCode a -> FCode a

forkAlts :: [FCode a] -> FCode [a]

forkProc :: FCode a -> FCode a

codeOnly :: FCode () -> FCode ()

type ConTagZ = Int

data Sequel

Constructors

Return Bool |
AssignTo [LocalReg] Bool |

Instances

Show Sequel |

withSequel :: Sequel -> FCode () -> FCode ()

getSequel :: FCode Sequel

setSRTLabel :: CLabel -> FCode a -> FCode a

getSRTLabel :: FCode CLabel

setTickyCtrLabel :: CLabel -> FCode () -> FCode ()

getTickyCtrLabel :: FCode CLabel

withUpdFrameOff :: UpdFrameOffset -> FCode () -> FCode ()

getUpdFrameOff :: FCode UpdFrameOffset

initUpdFrameOff :: UpdFrameOffset

data HeapUsage

Constructors

HeapUsage |

Fields

virtHp :: VirtualHpOffset
realHp :: VirtualHpOffset

type VirtualHpOffset = WordOff

initHpUsage :: HeapUsage

getHpUsage :: FCode HeapUsage

setHpUsage :: HeapUsage -> FCode ()

heapHWM :: HeapUsage -> VirtualHpOffset

setVirtHp :: VirtualHpOffset -> FCode ()

getVirtHp :: FCode VirtualHpOffset

setRealHp :: VirtualHpOffset -> FCode ()

getModuleName :: FCode Module

getState :: FCode CgState

setState :: CgState -> FCode ()

getInfoDown :: FCode CgInfoDownwards

getDynFlags :: FCode DynFlags

getThisPackage :: FCode PackageId

data CgIdInfo

Constructors

CgIdInfo |

Fields

cg_id :: Id
cg_lf :: LambdaFormInfo
cg_loc :: CgLoc
cg_tag :: !DynTag

Instances

PlatformOutputable CgIdInfo |

data CgLoc

Constructors

CmmLoc CmmExpr |
LneLoc BlockId [LocalReg] |

Instances

PlatformOutputable CgLoc |

getBinds :: FCode CgBindings

setBinds :: CgBindings -> FCode ()

getStaticBinds :: FCode CgBindings

data CgInfoDownwards

Constructors

MkCgInfoDown |

Fields

cgd_dflags :: DynFlags
cgd_mod :: Module
cgd_statics :: CgBindings
cgd_srt_lbl :: CLabel
cgd_updfr_off :: UpdFrameOffset
cgd_ticky :: CLabel
cgd_sequel :: Sequel

data CgState

Constructors

MkCgState |

Fields

cgs_stmts :: CmmAGraph
cgs_tops :: OrdList CmmDecl
cgs_binds :: CgBindings
cgs_hp_usg :: HeapUsage
cgs_uniqs :: UniqSupply