ARMCC: Information about optimization level during runtime
Information in this knowledgebase article applies to:
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?
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.
Last Reviewed: Friday, December 14, 2018
of your data.