Keil Logo

ARMCC: Information about optimization level during runtime


Information in this knowledgebase article applies to:

  • ARMCC v5.xx

QUESTION

During the runtime, I would like to see the information about the optimization level of my program.

Is there any compiler directive or pragma options to check such an information?

ANSWER

It is possible to get the information about the optimization levels during the run and compile time.

To know the optimization level at runtime, use the predefined macro __OPTIMISE_LEVEL in your source code. This predefined macro can be assigned to a constant variable and corresponding value of optimization can be extracted from this variable during the run time, such as:

unsinged int i =__OPTIMISE_LEVEL;

To know the optimization level at compile time, check the compiler control string.

MORE INFORMATION

SEE ALSO

Last Reviewed: Friday, December 14, 2018


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  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.