GHC.Cmm.Info

ghc-9.2.3: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Cmm.Info

Synopsis

- mkEmptyContInfoTable :: CLabel -> CmmInfoTable
- cmmToRawCmm :: Logger -> DynFlags -> Stream IO CmmGroupSRTs a -> IO (Stream IO RawCmmGroup a)
- srtEscape :: Platform -> StgHalfWord
- data PtrOpts = PtrOpts {
  - po_profile :: !Profile
  - po_align_check :: !Bool
  }
- closureInfoPtr :: PtrOpts -> CmmExpr -> CmmExpr
- entryCode :: Platform -> CmmExpr -> CmmExpr
- getConstrTag :: PtrOpts -> CmmExpr -> CmmExpr
- cmmGetClosureType :: PtrOpts -> CmmExpr -> CmmExpr
- infoTable :: Profile -> CmmExpr -> CmmExpr
- infoTableConstrTag :: Profile -> CmmExpr -> CmmExpr
- infoTableSrtBitmap :: Profile -> CmmExpr -> CmmExpr
- infoTableClosureType :: Profile -> CmmExpr -> CmmExpr
- infoTablePtrs :: Profile -> CmmExpr -> CmmExpr
- infoTableNonPtrs :: Profile -> CmmExpr -> CmmExpr
- funInfoTable :: Profile -> CmmExpr -> CmmExpr
- funInfoArity :: Profile -> CmmExpr -> CmmExpr
- stdInfoTableSizeW :: Profile -> WordOff
- fixedInfoTableSizeW :: WordOff
- profInfoTableSizeW :: WordOff
- maxStdInfoTableSizeW :: WordOff
- maxRetInfoTableSizeW :: WordOff
- stdInfoTableSizeB :: Profile -> ByteOff
- conInfoTableSizeB :: Profile -> Int
- stdSrtBitmapOffset :: Profile -> ByteOff
- stdClosureTypeOffset :: Profile -> ByteOff
- stdPtrsOffset :: Profile -> ByteOff
- stdNonPtrsOffset :: Profile -> ByteOff

# Documentation

mkEmptyContInfoTable :: CLabel -> CmmInfoTable Source #

cmmToRawCmm :: Logger -> DynFlags -> Stream IO CmmGroupSRTs a -> IO (Stream IO RawCmmGroup a) Source #

srtEscape :: Platform -> StgHalfWord Source #

Value of the srt field of an info table when using an StgLargeSRT

data PtrOpts Source #

Constructors

PtrOpts |
Fields po_profile :: !Profile Platform profile po_align_check :: !Bool Insert alignment check (cf `-falignment-sanitisation`)

closureInfoPtr :: PtrOpts -> CmmExpr -> CmmExpr Source #

Takes a closure pointer and returns the info table pointer

entryCode :: Platform -> CmmExpr -> CmmExpr Source #

Takes an info pointer (the first word of a closure) and returns its entry code

getConstrTag :: PtrOpts -> CmmExpr -> CmmExpr Source #

Takes a closure pointer, and return the *zero-indexed* constructor tag obtained from the info table This lives in the SRT field of the info table (constructors don't need SRTs).

cmmGetClosureType :: PtrOpts -> CmmExpr -> CmmExpr Source #

Takes a closure pointer, and return the closure type obtained from the info table

infoTable :: Profile -> CmmExpr -> CmmExpr Source #

Takes an info pointer (the first word of a closure) and returns a pointer to the first word of the standard-form info table, excluding the entry-code word (if present)

infoTableConstrTag :: Profile -> CmmExpr -> CmmExpr Source #

Takes an info table pointer (from infoTable) and returns the constr tag field of the info table (same as the srt_bitmap field)

infoTableSrtBitmap :: Profile -> CmmExpr -> CmmExpr Source #

Takes an info table pointer (from infoTable) and returns the srt_bitmap field of the info table

infoTableClosureType :: Profile -> CmmExpr -> CmmExpr Source #

Takes an info table pointer (from infoTable) and returns the closure type field of the info table.

infoTablePtrs :: Profile -> CmmExpr -> CmmExpr Source #

infoTableNonPtrs :: Profile -> CmmExpr -> CmmExpr Source #

funInfoTable :: Profile -> CmmExpr -> CmmExpr Source #

Takes the info pointer of a function, and returns a pointer to the first word of the StgFunInfoExtra struct in the info table.

funInfoArity :: Profile -> CmmExpr -> CmmExpr Source #

Takes the info pointer of a function, returns the function's arity

stdInfoTableSizeW :: Profile -> WordOff Source #

fixedInfoTableSizeW :: WordOff Source #

profInfoTableSizeW :: WordOff Source #

maxStdInfoTableSizeW :: WordOff Source #

maxRetInfoTableSizeW :: WordOff Source #

stdInfoTableSizeB :: Profile -> ByteOff Source #

conInfoTableSizeB :: Profile -> Int Source #

stdSrtBitmapOffset :: Profile -> ByteOff Source #

Byte offset of the SRT bitmap half-word which is in the *higher-addressed* part of the type_lit

stdClosureTypeOffset :: Profile -> ByteOff Source #

Byte offset of the closure type half-word

stdPtrsOffset :: Profile -> ByteOff Source #

stdNonPtrsOffset :: Profile -> ByteOff Source #