next up previous contents
Next: Unreachable Code Elimination Up: Optimizations Previous: Optimizations

Local optimizations

In each basic block, I perform value numbering to do constant folding and local common sub-expression elimination in that block. The value of all variables that are detected to be constants are propagated locally for constant folding. Also, repeated use of the same expression is detected, and instead of performing the computation multiply, these values are stored in new pseudo-variables and are re-used.



Suman Banerjee
Tue Jun 16 14:38:56 EDT 1998