Compiler Optimizations
Copy propagation
- Following an assignment compiler replaces references to a variable with its value
Common sub-expression elimination
- When 2 or more expressions produce the same value, the compiler computes the value once and reuses it
Redundant assignment elimination
- Redundant assignment occur mainly due to the above two optimizations and are completely eliminated