StgCmmMonad

ghc-7.6.3: The GHC API

Safe Haskell | None

StgCmmMonad

# Documentation

data FCode a

Instances

Monad FCode |
HasDynFlags FCode |

initC :: IO CgState

runC :: DynFlags -> Module -> CgState -> FCode a -> (a, CgState)

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

newLabelC :: FCode BlockId

emitLabel :: BlockId -> FCode ()

emit :: CmmAGraph -> FCode ()

emitDecl :: CmmDecl -> FCode ()

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

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

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

emitOutOfLine :: BlockId -> CmmAGraph -> FCode ()

emitAssign :: CmmReg -> CmmExpr -> FCode ()

emitStore :: CmmExpr -> CmmExpr -> FCode ()

emitComment :: FastString -> 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

mkCmmIfThenElse :: CmmExpr -> CmmAGraph -> CmmAGraph -> FCode CmmAGraph

mkCmmIfThen :: CmmExpr -> CmmAGraph -> FCode CmmAGraph

mkCmmIfGoto :: CmmExpr -> BlockId -> FCode CmmAGraph

mkCall :: CmmExpr -> (Convention, Convention) -> [CmmFormal] -> [CmmActual] -> UpdFrameOffset -> (ByteOff, [(CmmExpr, ByteOff)]) -> FCode CmmAGraph

mkCmmCall :: CmmExpr -> [CmmFormal] -> [CmmActual] -> UpdFrameOffset -> FCode CmmAGraph

mkSafeCall :: ForeignTarget -> [CmmFormal] -> [CmmActual] -> UpdFrameOffset -> Bool -> FCode CmmAGraph

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 :: HasDynFlags m => m DynFlags

getThisPackage :: FCode PackageId

data CgIdInfo

Constructors

CgIdInfo |
Fields cg_id :: Id cg_lf :: LambdaFormInfo cg_loc :: CgLoc cg_tag :: !DynTag

Instances

Outputable CgIdInfo |

data CgLoc

Constructors

CmmLoc CmmExpr |
LneLoc BlockId [LocalReg] |

Instances

Outputable 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