Chapter 9. Data-Flow Analysis
Compilers analyze the
ir form of the program being compiled to identify opportunities where the code can be improved and to prove the safety and profitability of transformations that might improve the code. Data-flow analysis is the classic technique for compile-time program analysis. It allows the compiler to reason about the runtime flow of values in the program.
This chapter explores iterative data-flow analysis, which uses a simple fixed-point algorithm. From the basics of data-flow analysis, it builds up the construction of static single-assignment (
ssa) form, illustrates the use of
ssa form, and introduces interprocedural analysis.
Keywords: Data-flow Analysis,
ssa Form, Dominance, Constant Propagation