ghc-lib-parser-9.10.1.20250103: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.StgToCmm.Types

Synopsis

- data CmmCgInfos = CmmCgInfos {
  - cgNonCafs :: !NonCaffySet
  - cgLFInfos :: !ModuleLFInfos
  - cgIPEStub :: !CStub
  }
- data LambdaFormInfo
  - = LFReEntrant !TopLevelFlag !RepArity !Bool !ArgDescr
  - | LFThunk !TopLevelFlag !Bool !Bool !StandardFormInfo !Bool
  - | LFCon !DataCon
  - | LFUnknown !Bool
  - | LFUnlifted
  - | LFLetNoEscape
- type ModuleLFInfos = NameEnv LambdaFormInfo
- data StandardFormInfo
  - = NonStandardThunk
  - | SelectorThunk !WordOff
  - | ApThunk !RepArity
- type DoSCCProfiling = Bool
- type DoExtDynRefs = Bool

# Documentation

data CmmCgInfos #

Codegen-generated Id infos, to be passed to downstream via interfaces.

This stuff is for optimization purposes only, they're not compulsory.

- When CafInfo of an imported Id is not known it's safe to treat it as CAFFY.
- When LambdaFormInfo of an imported Id is not known it's safe to treat it as `LFUnknown True` (which just says "it could be anything" and we do slow entry).

See also Note [Conveying CAF-info and LFInfo between modules] above.

Constructors

CmmCgInfos |

Fields

- cgNonCafs :: !NonCaffySet

  Exported Non-CAFFY closures in the current module. Everything else is either not exported of CAFFY.

- cgLFInfos :: !ModuleLFInfos

  LambdaFormInfos of exported closures in the current module.

- cgIPEStub :: !CStub

  The C stub which is used for IPE information

data LambdaFormInfo #

Information about an identifier, from the code generator's point of view. Every identifier is bound to a LambdaFormInfo in the environment, which gives the code generator enough info to be able to tail call or return that identifier.

Constructors

LFReEntrant !TopLevelFlag !RepArity !Bool !ArgDescr |
LFThunk !TopLevelFlag !Bool !Bool !StandardFormInfo !Bool |
LFCon !DataCon |
LFUnknown !Bool |
LFUnlifted |
LFLetNoEscape |

#### Instances

Instances details

Outputable LambdaFormInfo # |
Instance details Defined in GHC.StgToCmm.Types Methods ppr :: LambdaFormInfo -> SDoc #

type ModuleLFInfos = NameEnv LambdaFormInfo #

Maps names in the current module to their LambdaFormInfos

data StandardFormInfo #

StandardFormInfo tells whether this thunk has one of a small number of standard forms

Constructors

NonStandardThunk |
SelectorThunk !WordOff |
ApThunk !RepArity |

#### Instances

Instances details

Outputable StandardFormInfo # |
Instance details Defined in GHC.StgToCmm.Types Methods ppr :: StandardFormInfo -> SDoc #
Eq StandardFormInfo # |
Instance details Defined in GHC.StgToCmm.Types Methods (==) :: StandardFormInfo -> StandardFormInfo -> Bool # (/=) :: StandardFormInfo -> StandardFormInfo -> Bool #

type DoSCCProfiling = Bool #

type DoExtDynRefs = Bool #