Optimization remarks provide you with information about the choices made by the compiler. You can use them to see which code has been inlined or they can help you understand why a loop has not been vectorized. By default, Arm® C/C++ Compiler prints compilation information to
stderr. Optimization remarks prints this optimization information to the terminal, or you can choose to pipe them to an output file.
To enable optimization remarks, choose from following
-Rpass=<regex>: Information about what the compiler has optimized.
-Rpass-analysis=<regex>: Information about what the compiler has analyzed.
-Rpass-missed=<regex>: Information about what the compiler failed to optimize.
For each option, replace
<regex> with an expression for the type of remarks you wish to view.
<regexp> queries are:
loop-vectorize filters remarks regarding vectorized loops,
inline for remarks regarding inlining, and
loop-unroll for remarks about unrolled loops.
To search for all remarks, use the expression
.*. Use this expression with caution; depending on the size of code, and the level of optimization, a lot of information can print.
To compile with optimization remarks enabled and pipe the information to an output file, pass the selected above options and debug information to
armclang, and use
> <output_filename>.txt. For example:
armclang -O<level> -Rpass[-<option>]=<remark> <filename>.c 2> <output_filename>.txt
Table of Contents