5.1 The compiler as an optimizing compiler

The compiler is highly optimizing for small code size and high performance, performing a range of optimization techniques.

The compiler performs optimizations common to other optimizing compilers, for example, data-flow optimizations such as common sub-expression elimination and loop optimizations such as loop combining and distribution.

In addition, the compiler performs a range of optimizations specific to ARM architecture-based processors.

Although the compiler performs a number of architecture independent optimizations, you can often significantly improve the performance of your C or C++ code by selecting correct optimization criteria, and the correct target processor and architecture.


Optimization options can limit debug information generated by the compiler.

Related concepts
5.2 Compiler optimization for code size versus speed
5.3 Compiler optimization levels and the debug view
5.6 Optimization of loop termination in C code
5.8 Compiler optimization and the volatile keyword
Related tasks
5.4 Selecting the target processor at compile time
Related reference
8.15 --autoinline, --no_autoinline
8.39 --cpu=name compiler option
8.42 --data_reorder, --no_data_reorder
8.83 --forceinline
8.85 --fpmode=model
8.106 --inline, --no_inline
8.113 --library_interface=lib
8.114 --library_type=lib
8.125 --lower_ropi, --no_lower_ropi
8.126 --lower_rwpi, --no_lower_rwpi
8.133 --multifile, --no_multifile
8.138 -Onum
8.141 -Ospace
8.142 -Otime
8.163 --retain=option
Non-ConfidentialPDF file icon PDF versionARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.