--retain=option

This option enables you to restrict the optimizations performed by the compiler.

Show/hideSyntax

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

Show/hideUsage

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.

Show/hideSee also

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0491C
Non-ConfidentialID080411