ghc-7.6.3: The GHC API

Safe Haskell | None

Cmm

Contents

- Cmm top-level datatypes
- Cmm graphs
- Info Tables
- Statements, expressions and types

Synopsis

- type CmmProgram = [CmmGroup]
- type CmmGroup = GenCmmGroup CmmStatics CmmTopInfo CmmGraph
- type GenCmmGroup d h g = [GenCmmDecl d h g]
- type CmmDecl = GenCmmDecl CmmStatics CmmTopInfo CmmGraph
- data GenCmmDecl d h g
  - = CmmProc h CLabel g
  - | CmmData Section d
- type CmmGraph = GenCmmGraph CmmNode
- data GenCmmGraph n = CmmGraph {
  - g_entry :: BlockId
  - g_graph :: Graph n C C
  }
- type CmmBlock = Block CmmNode C C
- data Section
  - = Text
  - | Data
  - | ReadOnlyData
  - | RelocatableReadOnlyData
  - | UninitialisedData
  - | ReadOnlyData16
  - | OtherSection String
- data CmmStatics = Statics CLabel [CmmStatic]
- data CmmStatic
  - = CmmStaticLit CmmLit
  - | CmmUninitialised Int
  - | CmmString [Word8]
- type CmmReplGraph e x = GenCmmReplGraph CmmNode e x
- type GenCmmReplGraph n e x = UniqSM (Maybe (Graph n e x))
- type CmmFwdRewrite f = FwdRewrite UniqSM CmmNode f
- type CmmBwdRewrite f = BwdRewrite UniqSM CmmNode f
- data CmmTopInfo = TopInfo {
  - info_tbl :: CmmInfoTable
  - stack_info :: CmmStackInfo
  }
- data CmmStackInfo = StackInfo {
  - arg_space :: ByteOff
  - updfr_space :: Maybe ByteOff
  }
- data CmmInfoTable
  - = CmmInfoTable {
    - cit_lbl :: CLabel
    - cit_rep :: SMRep
    - cit_prof :: ProfilingInfo
    - cit_srt :: C_SRT
    }
  - | CmmNonInfoTable
- data ClosureTypeInfo
  - = Constr ConstrTag ConstrDescription
  - | Fun FunArity ArgDescr
  - | Thunk
  - | ThunkSelector SelectorOffset
  - | BlackHole
- data C_SRT
  - = NoC_SRT
  - | C_SRT !CLabel !WordOff !StgHalfWord
- needsSRT :: C_SRT -> Bool
- data ProfilingInfo
  - = NoProfilingInfo
  - | ProfilingInfo [Word8] [Word8]
- type ConstrDescription = [Word8]
- module CmmNode
- module CmmExpr

# Cmm top-level datatypes

type CmmProgram = [CmmGroup]

type CmmGroup = GenCmmGroup CmmStatics CmmTopInfo CmmGraph

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

type CmmDecl = GenCmmDecl CmmStatics CmmTopInfo CmmGraph

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 g |
CmmData Section d |

Instances

(Outputable d, Outputable info, Outputable i) => Outputable (GenCmmDecl d info i) |

type CmmGraph = GenCmmGraph CmmNode

data GenCmmGraph n

Constructors

CmmGraph |

Fields

g_entry :: BlockId
g_graph :: Graph n C C

Instances

Outputable CmmGraph |

type CmmBlock = Block CmmNode C C

data Section

Constructors

Text |
Data |
ReadOnlyData |
RelocatableReadOnlyData |
UninitialisedData |
ReadOnlyData16 |
OtherSection String |

data CmmStatics

Constructors

Statics CLabel [CmmStatic] |

Instances

Outputable CmmStatics |

data CmmStatic

Constructors

CmmStaticLit CmmLit |
CmmUninitialised Int |
CmmString [Word8] |

Instances

Outputable CmmStatic |

# Cmm graphs

type CmmReplGraph e x = GenCmmReplGraph CmmNode e x

type GenCmmReplGraph n e x = UniqSM (Maybe (Graph n e x))

type CmmFwdRewrite f = FwdRewrite UniqSM CmmNode f

type CmmBwdRewrite f = BwdRewrite UniqSM CmmNode f

# Info Tables

data CmmTopInfo

Constructors

TopInfo |

Fields

info_tbl :: CmmInfoTable
stack_info :: CmmStackInfo

Instances

Outputable CmmTopInfo |

data CmmStackInfo

Constructors

StackInfo |

Fields

arg_space :: ByteOff
updfr_space :: Maybe ByteOff

Instances

Outputable CmmStackInfo |

data CmmInfoTable

Info table as a haskell data type

Constructors

CmmInfoTable |

Fields

cit_lbl :: CLabel
cit_rep :: SMRep
cit_prof :: ProfilingInfo
cit_srt :: C_SRT

CmmNonInfoTable |

Instances

Outputable CmmInfoTable |

data ClosureTypeInfo

Constructors

Constr ConstrTag ConstrDescription |
Fun FunArity ArgDescr |
Thunk |
ThunkSelector SelectorOffset |
BlackHole |

Instances

Outputable ClosureTypeInfo |

data C_SRT

Constructors

NoC_SRT |
C_SRT !CLabel !WordOff !StgHalfWord |

Instances

Eq C_SRT |
Outputable C_SRT |

needsSRT :: C_SRT -> Bool

data ProfilingInfo

Constructors

NoProfilingInfo |
ProfilingInfo [Word8] [Word8] |

type ConstrDescription = [Word8]

# Statements, expressions and types

module CmmNode

module CmmExpr