ghc-9.2.0.20210821: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Cmm

Synopsis

Cmm top-level datatypes

type CmmGroup = GenCmmGroup CmmStatics CmmTopInfo CmmGraph Source #

Cmm group before SRT generation

type RawCmmGroup = GenCmmGroup RawCmmStatics (LabelMap RawCmmStatics) CmmGraph Source #

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

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

data GenCmmDecl d h g Source #

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) Source # 
Instance details

Defined in GHC.Cmm.Ppr.Decl

Methods

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

Functor (GenCmmDecl d h) Source # 
Instance details

Defined in GHC.Cmm

Methods

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

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

data GenCmmGraph n Source #

Constructors

CmmGraph 

Fields

Instances

Instances details
OutputableP Platform CmmGraph Source # 
Instance details

Defined in GHC.Cmm.Ppr

Methods

pdoc :: Platform -> CmmGraph -> SDoc Source #

data GenCmmStatics (rawOnly :: Bool) where Source #

Constructors

CmmStatics :: CLabel -> CmmInfoTable -> CostCentreStack -> [CmmLit] -> GenCmmStatics 'False 
CmmStaticsRaw :: CLabel -> [CmmStatic] -> GenCmmStatics a

Static data, after SRTs are generated

Instances

Instances details
OutputableP Platform (GenCmmStatics a) Source # 
Instance details

Defined in GHC.Cmm.Ppr.Decl

data CmmStatic Source #

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

an embedded binary file

Instances

Instances details
Outputable CmmStatic Source # 
Instance details

Defined in GHC.Cmm

Methods

ppr :: CmmStatic -> SDoc Source #

OutputableP Platform CmmStatic Source # 
Instance details

Defined in GHC.Cmm.Ppr.Decl

sectionProtection :: Section -> SectionProtection Source #

Should a data in this section be considered constant at runtime

Blocks containing lists

data GenBasicBlock i Source #

Constructors

BasicBlock BlockId [i] 

Instances

Instances details
Functor GenBasicBlock Source # 
Instance details

Defined in GHC.Cmm

Methods

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

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

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

Defined in GHC.Cmm

Methods

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

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

Defined in GHC.Cmm

Methods

ppr :: GenBasicBlock instr -> SDoc Source #

blockId :: GenBasicBlock i -> BlockId Source #

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

newtype ListGraph i Source #

Constructors

ListGraph [GenBasicBlock i] 

Instances

Instances details
Functor ListGraph Source # 
Instance details

Defined in GHC.Cmm

Methods

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

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

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

Defined in GHC.Cmm

Methods

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

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

Defined in GHC.Cmm

Methods

ppr :: ListGraph instr -> SDoc Source #

Info Tables

data CmmTopInfo Source #

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 Source # 
Instance details

Defined in GHC.Cmm.Ppr

data CmmStackInfo Source #

Constructors

StackInfo 

Instances

Instances details
Outputable CmmStackInfo Source # 
Instance details

Defined in GHC.Cmm.Ppr

data CmmInfoTable Source #

Info table as a haskell data type

Instances

Instances details
OutputableP Platform CmmInfoTable Source # 
Instance details

Defined in GHC.Cmm.Ppr.Decl

data ClosureTypeInfo Source #

Instances

Instances details
Outputable ClosureTypeInfo Source # 
Instance details

Defined in GHC.Runtime.Heap.Layout

Statements, expressions and types