Compiler Reference GuidePreface armclang Command-line Options Compiler-specific Keywords and Operators Compiler-specific Function, Variable, and Type Att Compiler-specific Intrinsics Compiler-specific Pragmas Other Compiler-specific Features ACLE support Predefined macros Inline functions Half-precision floating-point data types Half-precision floating-point number format Half-precision floating-point intrinsics Library support for _Float16 data type TT instruction intrinsics Non-secure function pointer intrinsics Standard C Implementation Definition Standard C++ Implementation Definition armclang Integrated Assembler armclang Inline Assembler
6.3 Inline functions
Inline functions offer a trade-off between code size and performance. By default, the compiler decides whether to inline functions.
With regards to optimization, by default the compiler optimizes for performance
with respect to time. If the compiler decides to inline a function, it makes sure to
avoid large code growth. When compiling to restrict code size, through the use of
In most circumstances, the decision to inline a particular function is best
left to the compiler. Qualifying a function with the
The linker is able to apply some degree of function inlining to short functions.
The default semantic rules for C-source code follow C99 rules. For inlining, it means that when you suggest a function is inlined, the compiler expects to find another, non-qualified, version of the function elsewhere in the code, to use when it decides not to inline. If the compiler cannot find the non-qualified version, it fails with the following error:
To avoid this problem, there are several options:
of your data.