ghc-8.0.2: The GHC API

Safe HaskellNone
LanguageHaskell2010

StgCmmPrim

Synopsis

Documentation

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.