StgCmmMonad

ghc-7.8.2: The GHC API

Safe Haskell | None
Language | Haskell98

StgCmmMonad

# Documentation

data FCode a Source

Instances

Monad FCode |
Functor FCode |
Applicative FCode |
HasDynFlags FCode |

initC :: IO CgState Source

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

thenC :: FCode () -> FCode a -> FCode a infixr 9 Source

thenFC :: FCode a -> (a -> FCode c) -> FCode c infixr 9 Source

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

returnFC :: a -> FCode a Source

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

newUnique :: FCode Unique Source

newUniqSupply :: FCode UniqSupply Source

newLabelC :: FCode BlockId Source

emitLabel :: BlockId -> FCode () Source

emit :: CmmAGraph -> FCode () Source

emitDecl :: CmmDecl -> FCode () Source

emitProc :: Maybe CmmInfoTable -> CLabel -> [GlobalReg] -> CmmAGraph -> Int -> FCode () Source

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

emitProcWithStackFrame :: Convention -> Maybe CmmInfoTable -> CLabel -> [CmmFormal] -> [CmmFormal] -> CmmAGraph -> Bool -> FCode () Source

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

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

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

emitComment :: FastString -> FCode () Source

getCmm :: FCode () -> FCode CmmGroup Source

aGraphToGraph :: CmmAGraph -> FCode CmmGraph Source

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

getCode :: FCode a -> FCode CmmAGraph Source

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

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

mkCmmIfThen :: CmmExpr -> CmmAGraph -> FCode CmmAGraph Source

mkCmmIfGoto :: CmmExpr -> BlockId -> FCode CmmAGraph Source

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

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

forkClosureBody :: FCode () -> FCode () Source

forkLneBody :: FCode a -> FCode a Source

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

codeOnly :: FCode () -> FCode () Source

type ConTagZ = Int Source

data Sequel Source

Constructors

Return Bool |
AssignTo [LocalReg] Bool |

data ReturnKind Source

Constructors

AssignedDirectly |
ReturnedTo BlockId ByteOff |

withSequel :: Sequel -> FCode a -> FCode a Source

getSequel :: FCode Sequel Source

setTickyCtrLabel :: CLabel -> FCode a -> FCode a Source

getTickyCtrLabel :: FCode CLabel Source

withUpdFrameOff :: UpdFrameOffset -> FCode a -> FCode a Source

getUpdFrameOff :: FCode UpdFrameOffset Source

initUpdFrameOff :: DynFlags -> UpdFrameOffset Source

data HeapUsage Source

Constructors

HeapUsage |
Fields virtHp :: VirtualHpOffset realHp :: VirtualHpOffset

type VirtualHpOffset = WordOff Source

initHpUsage :: HeapUsage Source

getHpUsage :: FCode HeapUsage Source

setHpUsage :: HeapUsage -> FCode () Source

heapHWM :: HeapUsage -> VirtualHpOffset Source

setVirtHp :: VirtualHpOffset -> FCode () Source

getVirtHp :: FCode VirtualHpOffset Source

setRealHp :: VirtualHpOffset -> FCode () Source

getModuleName :: FCode Module Source

getState :: FCode CgState Source

setState :: CgState -> FCode () Source

getSelfLoop :: FCode (Maybe SelfLoopInfo) Source

withSelfLoop :: SelfLoopInfo -> FCode a -> FCode a Source

getInfoDown :: FCode CgInfoDownwards Source

getDynFlags :: HasDynFlags m => m DynFlags Source

getThisPackage :: FCode PackageId Source

data CgIdInfo Source

Constructors

CgIdInfo |
Fields cg_id :: Id cg_lf :: LambdaFormInfo cg_loc :: CgLoc

Instances

Outputable CgIdInfo |

getBinds :: FCode CgBindings Source

setBinds :: CgBindings -> FCode () Source

data CgInfoDownwards Source

Constructors

MkCgInfoDown |
Fields cgd_dflags :: DynFlags cgd_mod :: Module cgd_updfr_off :: UpdFrameOffset cgd_ticky :: CLabel cgd_sequel :: Sequel cgd_self_loop :: Maybe SelfLoopInfo

data CgState Source

Constructors

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