Skip to main content

Module dominator

Module dominator 

Source
Expand description

Dominator and post-dominator tree computation.

Port of Dominator.ts and ComputeUnconditionalBlocks.ts. Uses the Cooper/Harvey/Kennedy algorithm from https://www.cs.rice.edu/~keith/Embed/dom.pdf

Structs§

PostDominator
Stores the immediate post-dominator for each block.

Functions§

compute_post_dominator_tree
Compute the post-dominator tree for a function.
compute_unconditional_blocks
Compute the set of blocks that are unconditionally executed from the entry.
post_dominator_frontier
Computes the post-dominator frontier of target_id. These are immediate predecessors of nodes that post-dominate target_id from which execution may not reach target_id. Intuitively, these are the earliest blocks from which execution branches such that it may or may not reach the target block.
post_dominators_of
Walks up the post-dominator tree to collect all blocks that post-dominate target_id.