This optimization inspects the entire code and removes all instructions that write to non-volatile variables if none of the variables written to are actually read anywhere in the code.
Dead Code Elimination also inspects your code and prints out suspicious variables:
- Unused variables: those are the variables that are unused and possibly were eliminated.
- Uninitialized variables: those are global variables that are read by the program but never written to. (The Data Flow Optimization detects uninitialized local and function variables.)
Both cases deserve a closer inspection, as they might indicate a problem with your program.
« Previous: Data Flow Optimization | Up: Code optimization | Next: Expression Optimization »