Dataflow Analysis
OVERVIEW
anal-y-sis: an examination of a complex, its elements, and their relations
Webster's Dictionary
An optimizing compiler transforms programs to improve their efficiency without changing their output. There are many transformations that improve efficiency:
- Register allocation: Keep two nonoverlapping temporaries in the same register. Common-subexpression elimination: If an expression is computed more than once, eliminate one of the computations.
- Dead-code elimination: Delete a computation whose result will never be used. Constant folding: If the operands of an expression are constants, do the computation at compile time.
This is not a complete list of optimizations. In fact, there can never be a complete list.