ghc-9.12.0.20241128: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.StgToCmm.Monad

Synopsis

Documentation

data FCode a Source #

Instances

Instances details
MonadGetUnique FCode Source # 
Instance details

Defined in GHC.StgToCmm.Monad

MonadUnique FCode Source # 
Instance details

Defined in GHC.StgToCmm.Monad

Applicative FCode Source # 
Instance details

Defined in GHC.StgToCmm.Monad

Methods

pure :: a -> FCode a #

(<*>) :: FCode (a -> b) -> FCode a -> FCode b #

liftA2 :: (a -> b -> c) -> FCode a -> FCode b -> FCode c #

(*>) :: FCode a -> FCode b -> FCode b #

(<*) :: FCode a -> FCode b -> FCode a #

Functor FCode Source # 
Instance details

Defined in GHC.StgToCmm.Monad

Methods

fmap :: (a -> b) -> FCode a -> FCode b #

(<$) :: a -> FCode b -> FCode a #

Monad FCode Source # 
Instance details

Defined in GHC.StgToCmm.Monad

Methods

(>>=) :: FCode a -> (a -> FCode b) -> FCode b #

(>>) :: FCode a -> FCode b -> FCode b #

return :: a -> FCode a #

initFCodeState :: Platform -> FCodeState Source #

runC :: StgToCmmConfig -> FCodeState -> CgState -> FCode a -> (a, CgState) Source #

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

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

Assumes natural alignment.

getCodeScoped :: FCode a -> FCode (a, CmmAGraphScoped) Source #

Generate code into a fresh tick (sub-)scope and gather generated code

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

forkAltPair :: FCode a -> FCode a -> FCode (a, a) Source #

type ConTagZ = Int Source #

A *zero-indexed* constructor tag

data Sequel Source #

A Sequel tells what to do with the result of this expression

Constructors

Return

Return result(s) to continuation found on the stack.

AssignTo 

Fields

  • [LocalReg]

    Put result(s) in these regs and fall through NB: no void arguments here

  • Bool

    Should we adjust the heap pointer back to recover space that's unused on this path? We need to do this only if the expression may allocate (e.g. it's a foreign call or allocating primOp)

Instances

Instances details
Outputable Sequel Source # 
Instance details

Defined in GHC.StgToCmm.Sequel

Methods

ppr :: Sequel -> SDoc Source #

data SelfLoopInfo Source #

Constructors

MkSelfLoopInfo 

Fields

tickScope :: FCode a -> FCode a Source #

Places blocks generated by the given code into a fresh (sub-)scope. This will make sure that Cmm annotations in our scope will apply to the Cmm blocks generated therein - but not the other way around.

getTickScope :: FCode CmmTickScope Source #

The current tick scope. We will assign this to generated blocks.

data CgIdInfo Source #

Constructors

CgIdInfo 

Fields

Instances

Instances details
OutputableP Platform CgIdInfo Source # 
Instance details

Defined in GHC.StgToCmm.Monad

Methods

pdoc :: Platform -> CgIdInfo -> SDoc Source #

getBinds :: FCode CgBindings Source #

setBinds :: CgBindings -> FCode () Source #

data StgToCmmConfig Source #

Constructors

StgToCmmConfig 

Fields