StgCmmPrim

ghc-8.4.0.20180224: The GHC API

Safe Haskell | None
Language | Haskell2010

StgCmmPrim

Synopsis

- cgOpApp :: StgOp -> [StgArg] -> Type -> FCode ReturnKind
- cgPrimOp :: [LocalReg] -> PrimOp -> [StgArg] -> FCode ()
- shouldInlinePrimOp :: DynFlags -> PrimOp -> [CmmExpr] -> Maybe ([LocalReg] -> FCode ())

# Documentation

cgOpApp :: StgOp -> [StgArg] -> Type -> FCode ReturnKind Source #

cgPrimOp :: [LocalReg] -> PrimOp -> [StgArg] -> FCode () Source #

shouldInlinePrimOp Source #

Arguments

:: DynFlags |
-> PrimOp | The primop
-> [CmmExpr] | The primop arguments
-> Maybe ([LocalReg] -> FCode ()) |

Decide whether an out-of-line primop should be replaced by an inline implementation. This might happen e.g. if there's enough static information, such as statically know arguments, to emit a more efficient implementation inline.

Returns `Nothing` if this primop should use its out-of-line implementation (defined elsewhere) and `Just` together with a code generating function that takes the output regs as arguments otherwise.