Keil Logo

General Optimizations

  • Common Tail Merging (Level 7)
    When there are multiple calls to a single function, some of the setup code can be reused, thereby reducing program size.
  • Constant Propagation (Level 6)
    The values of expressions are tracked and, when possible, constant values are inserted instead of variable accesses.
  • Constant Folding (Level 0)
    The compiler performs calculations that reduce expressions to numeric constants, where possible. This includes calculations of run-time addresses.
  • Dead Code Elimination (Level 1)
    Unused code fragments and artifacts are eliminated.
  • Global Common Subexpression Elimination (Level 4)
    Identical subexpressions within a function are calculated only once when possible. The intermediate result is stored in a register and reused.
  • Jump Negation (Level 1)
    Conditional jumps are closely examined to see if they can be streamlined or eliminated by the inversion of the test logic.
  • Jump Optimizing (Level 0)
    The compiler always extends jumps to the final target. Jumps to jumps are eliminated.
  • Life Variable Analysis (Level 5)
    Redundant store operations are replaced with the use of automatic variables.
  • Local Common Subexpression Elimination (Level 4)
    The compiler detects multiple uses of the same expression or subexpression. The result of the first expression is saved and reused when possible. Superfluous expression calculations are eliminated from the code.
  • Register Variable Lifetime Analysis (Level 8)
    Register variables are relocated in CPU registers to improve execution speed and code density.
  • Register Variables (Level 3)
    Automatic variables and function arguments are located in registers when possible. Reservation of data memory for these variables is omitted.
  • Unreachable Code Analysis (Level 3)
    Code that cannot be reached because of constant conditional expressions or unreferenced labels is removed.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.