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

Note

Optimization options can limit debug information generated by the compiler.
Related concepts
4.2 Compiler optimization for code size versus speed
4.3 Compiler optimization levels and the debug view
4.6 Optimization of loop termination in C code
4.8 Compiler optimization and the volatile keyword
Related tasks
4.4 Selecting the target processor at compile time
Related reference
7.11 --autoinline, --no_autoinline
7.29 --cpu=name compiler option
7.32 --data_reorder, --no_data_reorder
7.66 --forceinline
7.68 --fpmode=model
7.87 --inline, --no_inline
7.94 --library_interface=lib
7.95 --library_type=lib
7.107 --lower_ropi, --no_lower_ropi
7.108 --lower_rwpi, --no_lower_rwpi
7.115 --multifile, --no_multifile
7.120 -Onum
7.124 -Ospace
7.125 -Otime
7.146 --retain=option
Non-ConfidentialPDF file icon PDF versionARM DUI0375F
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.