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.Dataflow

  • 10 types
  • 11 values
  • Packageghc-9.10.3
  • Exports23
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceBlock.hs
datadata Block (n :: Extensibility -> Extensibility -> Type) (e :: Extensibility) (x :: Extensibility) where
#

A sequence of nodes. May be any of four shapes (OO, OC, CO, CC). Open at the entry means single entry, mutatis mutandis for exit. A closedclosed block is a basic/ block and can't be extended further. Clients should avoid manipulating blocks and should stick to either nodes or graphs.

Instances6OutputableP, NonLocal
valuefoldNodesBwdOO :: (node O O -> f -> f) -> Block node O O -> f -> f
#

Folds backward over all nodes of an open-open block. Strict in the accumulator.

valuefoldRewriteNodesBwdOO
  1. :: node O O -> f -> UniqSM (Block node O O, f)
  2. -> Block node O O
  3. -> f
  4. -> UniqSM (Block node O O, f)
#

Folds backward over all the nodes of an open-open block and allows rewriting them. The accumulator is both the block of nodes and f (usually dataflow facts). Strict in both accumulated parts.

datadata JoinedFact a
#

The result of joining OldFact and NewFact.

Constructors

  • Changed !a

    Result is different than OldFact.

  • NotChanged !a

    Result is the same as OldFact.

typetype RewriteFun f = CmmBlock -> FactBase f -> UniqSM (CmmBlock, FactBase f)
#

Function for rewriting and analysis combined. To be used with rewriteCmm.

Currently set to work with UniqSM monad, but we could probably abstract that away (if we do that, we might want to specialize the fixpoint algorithms to the particular monads through SPECIALIZE).

familytype family Fact (x :: Extensibility) f
#
Instances2Fact
  • type Fact C f = FactBase fDefined in ghc-9.10.3 · GHC.Cmm.Dataflow
  • type Fact O f = fDefined in ghc-9.10.3 · GHC.Cmm.Dataflow