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

GHC.Cmm

Synopsis

Cmm top-level datatypes

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 [GlobalReg] 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 GenCmmGraph (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 #

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

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 CmmTopInfo #

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

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