|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Demonstrates dominator tree and dominance frontier computation for SSA construction in a compiler pipeline. More...
Go to the source code of this file.
Functions | |
| int | main () |
| Demonstrates construction of a control-flow graph and performs dominance analyses. | |
Demonstrates dominator tree and dominance frontier computation for SSA construction in a compiler pipeline.
Builds a control-flow graph (CFG) with if-else and loop structures, computes the dominator tree using the Lengauer-Tarjan algorithm, and shows where phi-functions would be placed for SSA form.
Definition in file dominators_example.cc.
| int main | ( | ) |
Demonstrates construction of a control-flow graph and performs dominance analyses.
Builds a sample CFG with if-else and loop structure, computes immediate dominators and post-dominators using the Lengauer–Tarjan algorithms, constructs dominator and post-dominator trees, computes dominance and post-dominance frontiers (for SSA phi-placement and CDG construction), reports blocks that need phi-functions, and runs example dominance/post-dominance queries while printing results to stdout.
Definition at line 90 of file dominators_example.cc.
References Aleph::Lengauer_Tarjan_Dominators< GT, SA >::build_tree(), Aleph::Lengauer_Tarjan_Dominators< GT, SA >::compute_idom(), Aleph::Lengauer_Tarjan_Post_Dominators< GT, SA >::compute_ipdom(), Aleph::df(), Aleph::divide_and_conquer_partition_dp(), Aleph::Lengauer_Tarjan_Dominators< GT, SA >::dominance_frontiers(), Aleph::Lengauer_Tarjan_Dominators< GT, SA >::dominates(), and Aleph::join().