8.163 --retain=option

Restricts the optimizations performed by the compiler.

Syntax

--retain=option

Where option is one of the following:

fns

prevents the removal of unused functions

inlinefns

prevents the removal of unused inline functions

noninlinefns

prevents the removal of unused non-inline functions

paths

prevents path-removing optimizations, such as a||b transformed to a|b. This supports Modified Condition Decision Coverage (MCDC) testing.

calls

prevents calls being removed, for example by inlining or tailcalling.

calls:distinct

prevents calls being merged, for example by cross-jumping (that is, common tail path merging).

libcalls

prevents calls to library functions being removed, for example by inline expansion.

data

prevents data being removed.

rodata

prevents read-only data being removed.

rwdata

prevents read-write data being removed.

data:order

prevents data being reordered.

If option is unspecified, the compiler faults use of --retain.

Usage

This option might be useful when performing validation, debugging, and coverage testing. In most other cases, it is not required.

Using this option can have a negative effect on code size and performance.

Related reference
10.41 __attribute__((nomerge)) function attribute
10.44 __attribute__((notailcall)) function attribute
Non-ConfidentialPDF file icon PDF versionARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.