cite:
(need to login)
- Post order Traversal
- Reverse Post Order Traversal
- DFS Search and BFS Search.
- Topological Sorting Algorithms.
Following mention the strength and Power of the above Algorithms in the Compiler Technologies.
- Copy Propagation in SSA. The Copy propagation requires the traversal of SSA either in post order or reverse post order to get the USE and DEF. Post order traversal uses to traverse the use of SSA variables before Def in order to perform copy propagation. Reverse post order to traverse Def before use.
- Loop Induction Variables requires to form a Strongly connected component between Load/Computation with plus/multiple in form of induction/Store. The traversal of SSA graph can be either in Post order and Reverse Post Order to form such Loop induction variable Analysis.
- Traversal of dominator tree can be either in Post Order and Reverse post order to rename the SSA variables to form the SSA graph based on Dominance frontier.
- Calculation of dominator and Post Dominator requires the Post Order and Reverse Post Order traversal.
- Traversal of dominator tree in Post Order and Reverse Post order helps in population of Live range representation in SSA graph.
- Traversal of Loop body in Post order and Reverse post order traversal helps in creating the regions on the CFG like SESE/SEME, hyperblock and superblocks.
- Live range population for each region formed above needs to be traversed in Post order and Reverse Post order.
- Traversal of SSA graphs for tree SSA optimizations like Loop induction, Loop distribution, Vectorization, Copy propagation, Loop invariants, Identification of PRE candidates.
- Traversal of Loop body in the DFS Search or BFS Search to form the Strongly connected Component. The SCC is formed with 2 Level DFS Search, and Tarjan Algorithm.
- Topological ordering of the Data Dependency graph forms the basis of vectorization.
- SLP based vectorization that forms the isomorphic operations requires traversal of Data Dependency graph in Depth Search or Breadth First Search manner.
- Forming and identification of reducible and irreducible loop require the traversal on Depth First Search manner.
- Basic Block Numbering of CFG require DFS Search Traversal.
- Fixed point Data flow Analysis ( forward and Backward Data Flow) requires post order and Reverse post order traversal of CFG.
- Formation and the scheduler algorithm like Trace Scheduling , Superblock Scheduling and the basic block scheduling require the DFS Search and the BFS Search on the DDG to perform the Scheduling Algorithm.
- Forming the Chain of recurrences and Scalar evolution of loops to represent the induction variable, require the traversal of SSA graphs.
- Partitioning formed for Loop distribution, Data layout optimization require DFS or BFS Search.
- Traversal of expression trees and Abstract Syntax tree require post order and Reverse Post order to form the code generation.
- Loop fusion/Loop fission require to traverse the loop body in Post order and Reverse Post order.
The above list is few and there are many application to the above algorithms in Compiler Technologies.