CmmBuildInfoTables

ghc-8.10.5: The GHC API

Safe Haskell | None
Language | Haskell2010

CmmBuildInfoTables

Synopsis

- type CAFSet = Set CAFLabel
- type CAFEnv = LabelMap CAFSet
- cafAnal :: LabelSet -> CLabel -> CmmGraph -> CAFEnv
- doSRTs :: DynFlags -> ModuleSRTInfo -> [(CAFEnv, [CmmDecl])] -> IO (ModuleSRTInfo, [CmmDecl])
- data ModuleSRTInfo
- emptySRT :: Module -> ModuleSRTInfo

# Documentation

type CAFSet = Set CAFLabel #

type CAFEnv = LabelMap CAFSet #

cafAnal :: LabelSet -> CLabel -> CmmGraph -> CAFEnv #

For each code block: - collect the references reachable from this code block to FUN, THUNK or RET labels for which hasCAF == True

This gives us a `CAFEnv`: a mapping from code block to sets of labels

doSRTs :: DynFlags -> ModuleSRTInfo -> [(CAFEnv, [CmmDecl])] -> IO (ModuleSRTInfo, [CmmDecl]) #

Attach SRTs to all info tables in the CmmDecls, and add SRT declarations to the ModuleSRTInfo.

data ModuleSRTInfo #

#### Instances

Instances details

Outputable ModuleSRTInfo # |
Instance details Defined in CmmBuildInfoTables Methods ppr :: ModuleSRTInfo -> SDoc # pprPrec :: Rational -> ModuleSRTInfo -> SDoc #

emptySRT :: Module -> ModuleSRTInfo #