Cheat sheets

CD-19Cheat sheet1 pageIn a paid pack

Reaching Definitions, Available Expressions

The data-flow framework (direction, transfer function, meet, boundary and initial values) and the round-robin iterative algorithm. Reaching definitions with gen and kill sets and a round-by-round fixed point on a four-block loop, used for use-definition chains and constant propagation. Available expressions with e_gen and e_kill, the intersection meet, why non-entry blocks start at the full set, and how the result drives global common-subexpression elimination. All sets come from a script.

CD-20Cheat sheet1 pageIn a paid pack

Liveness and Constant Propagation

Live-variable analysis: use and def sets, the backward equations, a pass-by-pass iteration on a four-block flow graph with a loop, statement-level liveness inside a block, and what liveness is used for (register allocation, dead stores). Constant propagation: the UNDEF, constant, NAC lattice, its meet table, the transfer function, a worked branch-and-join example, a loop, and why the iterative result can be weaker than checking each path. Every set and value comes from a script.

Diagrams from CD-20