Study this topic

Basic Blocks and Control-Flow Graphs

Optimisation and code generation work on three-address code organised into basic blocks: maximal straight-line sequences that control enters only at the top and leaves only at the bottom.

Short notes8 min read

Common Subexpression Elimination

An expression is a common subexpression if it was computed earlier and its operands have not changed since. Reusing the earlier value is common subexpression elimination; across blocks it relies on the available expressions analysis.

Short notes7 min read