You copied the Doc URL to your clipboard.

Optimization remarks

Optimization remarks provide you with information about the choices made by the compiler. They can be used to see which code has been inlined or can help you understand why a loop has not been vectorized. By default, Arm Fortran 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 options:

  • -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.

Recommended <regexp> queries are:

  • -Rpass=\(loop-vectorize\|inline\|loop-unroll)

  • -Rpass-missed=\(loop-vectorize\|inline\|loop-unroll)

  • -Rpass-analysis=\(loop-vectorize\|inline\|loop-unroll)

where loop-vectorize will filter 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 .*. However, use this expression with care because a lot of information can print depending on the size of your code, and the level of optimization performed.

To generate the required debug information, you must combine the -Rpass option with any of the following -g flags:

  • -g: Emits debug information into the binary.

  • -gline-tables-only: Only emits line table debug information into the binary.

To compile with optimization remarks enabled, debug information specified, and pipe the information to an output file, pass the selected above options and debug information to armflang, and use > <outputfile>:

armflang -O<level> -Rpass=<option> <example.f90> <debug_information> 2> <output_file.txt>

Table of Contents

Was this page helpful? Yes No