HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Moduleghc-10.0.0.20260917GHC2024

GHC.CmmToAsm.CFG.Dominators

The Lengauer-Tarjan graph dominators algorithm.

1 Lengauer, Tarjan, A Fast Algorithm for Finding Dominators in a Flowgraph, 1979.

2 Muchnick, Advanced Compiler Design and Implementation, 1997.

3 Brisk, Sarrafzadeh, Interference CGraphs for Procedures in Static Single Information Form are Interval CGraphs, 2007.

  • Strictness

Unless stated otherwise all exposed functions might fully evaluate their input but are not guaranteed to do so.

Synopsis
valueidom :: Rooted -> [(Node, Node)]

Immediate dominators. O(|E|*alpha(|E|,|V|)), where alpha(m,n) is "a functional inverse of Ackermann's function".

This Complexity bound assumes O(1) indexing. Since we're using IntMap, it has an additional lg |V| factor somewhere in there. I'm not sure where.