IT lexicon › Programming › Post-dominator

Post-dominator

Programming På svenska → Updated: 2026-11-05

Block B post-dominates block A if every path from A to the function's exit has to pass through B.

It is dominance turned around: instead of asking what must have happened before, it asks what is guaranteed to happen after. It is computed with the same algorithms as ordinary dominators, just on the reversed control-flow graph, with a fake common exit node when the function has several returns.

The main customer is control dependence. A statement is control-dependent on a branch if the branch decides whether it runs, and that is defined precisely in terms of post-dominance; Ferrante, Ottenstein and Warren built their program dependence graph on it in 1987. Aggressive dead code elimination leans on the same notion. On GPUs, the immediate post-dominator marks where threads that diverged at an if reconverge — and infinite loops, which have no path to the exit, are the edge case every implementation ends up handling by hand.

← Back to the lexicon