A Compiler Optimization should be:

  • Semantics-preserving
  • Profitable
  • Widely applicable
  • Cheap to perform
    • Compilation time
    • Memory requirements
    • Implementation complexity