ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions
Safe HaskellIgnore
LanguageGHC2021

GHC.Cmm

Synopsis

Cmm top-level datatypes

type DCmmGroup = GenCmmGroup CmmStatics DCmmTopInfo DCmmGraph #

Cmm group after STG generation

type CmmGroup = GenCmmGroup CmmStatics CmmTopInfo CmmGraph #

Cmm group before SRT generation

type RawCmmGroup = GenCmmGroup RawCmmStatics (LabelMap RawCmmStatics) CmmGraph #

Raw cmm group (TODO (osa): not sure what that means)

type GenCmmGroup d h g = [GenCmmDecl d h g] #

data GenCmmDecl d h g #

A top-level chunk, abstracted over the type of the contents of the basic blocks (Cmm or instructions are the likely instantiations).

Constructors

CmmProc h CLabel [GlobalRegUse] g 
CmmData Section d 

Instances

Instances details
(OutputableP Platform d, OutputableP Platform info, OutputableP Platform i) => OutputableP Platform (GenCmmDecl d info i) # 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: Platform -> GenCmmDecl d info i -> SDoc #

Functor (GenCmmDecl d h) # 
Instance details

Defined in GHC.Cmm

Methods

fmap :: (a -> b) -> GenCmmDecl d h a -> GenCmmDecl d h b #

(<$) :: a -> GenCmmDecl d h b -> GenCmmDecl d h a #

type CmmDataDecl = GenCmmDataDecl CmmStatics #

cmmDataDeclCmmDecl :: GenCmmDataDecl d -> GenCmmDecl d h g #

data GenGenCmmGraph (s :: Type -> Type) (n :: Extensibility -> Extensibility -> Type) #

Constructors

CmmGraph 

Fields

Instances

Instances details
OutputableP Platform CmmGraph # 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: Platform -> CmmGraph -> SDoc #

data Section #

Constructors

Section SectionType CLabel 

data GenCmmStatics (rawOnly :: Bool) where #

Static data before or after SRT generation

Constructors

CmmStatics :: CLabel -> CmmInfoTable -> CostCentreStack -> [CmmLit] -> [CmmLit] -> GenCmmStatics 'False 
CmmStaticsRaw :: forall (rawOnly :: Bool). CLabel -> [CmmStatic] -> GenCmmStatics rawOnly

Static data, after SRTs are generated

Instances

Instances details
OutputableP Platform (GenCmmStatics a) # 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: Platform -> GenCmmStatics a -> SDoc #

data CmmStatic #

Constructors

CmmStaticLit CmmLit

a literal value, size given by cmmLitRep of the literal.

CmmUninitialised Int

uninitialised data, N bytes long

CmmString ByteString

string of 8-bit values only, not zero terminated.

CmmFileEmbed FilePath Int

an embedded binary file and its byte length

Instances

Instances details
Outputable CmmStatic # 
Instance details

Defined in GHC.Cmm

Methods

ppr :: CmmStatic -> SDoc #

OutputableP Platform CmmStatic # 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: Platform -> CmmStatic -> SDoc #

sectionProtection :: Section -> SectionProtection #

Should a data in this section be considered constant at runtime

newtype DWrap a #

Constructors

DWrap [(BlockId, a)] 

unDeterm :: DWrap a -> [(BlockId, a)] #

Blocks containing lists

data GenBasicBlock i #

Constructors

BasicBlock BlockId [i] 

Instances

Instances details
Functor GenBasicBlock # 
Instance details

Defined in GHC.Cmm

Methods

fmap :: (a -> b) -> GenBasicBlock a -> GenBasicBlock b #

(<$) :: a -> GenBasicBlock b -> GenBasicBlock a #

OutputableP env instr => OutputableP env (GenBasicBlock instr) # 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: env -> GenBasicBlock instr -> SDoc #

Outputable instr => Outputable (GenBasicBlock instr) # 
Instance details

Defined in GHC.Cmm

Methods

ppr :: GenBasicBlock instr -> SDoc #

blockId :: GenBasicBlock i -> BlockId #

The branch block id is that of the first block in the branch, which is that branch's entry point

newtype ListGraph i #

Constructors

ListGraph [GenBasicBlock i] 

Instances

Instances details
Functor ListGraph # 
Instance details

Defined in GHC.Cmm

Methods

fmap :: (a -> b) -> ListGraph a -> ListGraph b #

(<$) :: a -> ListGraph b -> ListGraph a #

OutputableP env instr => OutputableP env (ListGraph instr) # 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: env -> ListGraph instr -> SDoc #

Outputable instr => Outputable (ListGraph instr) # 
Instance details

Defined in GHC.Cmm

Methods

ppr :: ListGraph instr -> SDoc #

Info Tables

data GenCmmTopInfo (f :: Type -> Type) #

CmmTopInfo is attached to each CmmDecl (see defn of CmmGroup), and contains the extra info (beyond the executable code) that belongs to that CmmDecl.

Constructors

TopInfo 

Instances

Instances details
OutputableP Platform CmmTopInfo # 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: Platform -> CmmTopInfo -> SDoc #

data CmmStackInfo #

Constructors

StackInfo 

Instances

Instances details
Outputable CmmStackInfo # 
Instance details

Defined in GHC.Cmm

Methods

ppr :: CmmStackInfo -> SDoc #

data CmmInfoTable #

Info table as a haskell data type

Statements, expressions and types

Pretty-printing