Represents the result of a reducibility analysis.
Instances2Eq, Show
Eq ReducibilityDefined in ghc-9.10.3 · GHC.Cmm.ReducibilityShow ReducibilityDefined in ghc-9.10.3 · GHC.Cmm.Reducibility
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Moduleghc-9.10.3GHC2021
Test a Cmm control-flow graph for reducibility. And provide a function that, when given an arbitrary control-flow graph, returns an equivalent, reducible control-flow graph. The equivalent graph is obtained by "splitting" (copying) nodes of the original graph. The resulting equivalent graph has the same dynamic behavior as the original, but it is larger.
Documentation uses the language of control-flow analysis, in which a basic block is called a "node." These "nodes" are CmmBlocks or equivalent; they have nothing to do with a CmmNode.
For more on reducibility and related analyses and algorithms, see Note [Reducibility resources]
Represents the result of a reducibility analysis.
Eq ReducibilityDefined in ghc-9.10.3 · GHC.Cmm.ReducibilityShow ReducibilityDefined in ghc-9.10.3 · GHC.Cmm.ReducibilityGiven a graph, say whether the graph is reducible. The graph must be bundled with a dominator analysis and a reverse postorder numbering, as these results are needed to perform the test.
Given a graph, return an equivalent reducible graph, by "splitting" (copying) nodes if necessary. The input graph must be bundled with a dominator analysis and a reverse postorder numbering. The computation is monadic because when a node is split, the new copy needs a fresh label.
Use this function whenever a downstream algorithm needs a reducible control-flow graph.