HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleghc-9.10.3GHC2021

GHC.Cmm.Graph

  • 4 types
  • 30 values
  • Packageghc-9.10.3
  • Exports34
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceGraph.hs
typetype CmmAGraph = OrdList CgStmt
#

CmmAGraph is a chunk of code consisting of:

  • ordinary statements (assignments, stores etc.)

  • jumps

  • labels

  • out-of-line labelled blocks

The semantics is that control falls through labels and out-of-line blocks. Everything after a jump up to the next label is by definition unreachable code, and will be discarded.

Two CmmAGraphs can be stuck together with *, with the meaning that control flows from the first to the second.

A CmmAGraph can be turned into a CmmGraph (closed at both ends) by providing a label for the entry point and a tick scope; see labelAGraph.