04.01.2015 Views

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Compiler Command-line Options<br />

Syntax<br />

-Onum<br />

Where num is one of the following:<br />

0 Minimum optimization. Turns off most optimizations. It gives the best<br />

possible debug view and the lowest level of optimization.<br />

1 Restricted optimization. Removes unused inline functions and unused<br />

static functions. Turns off optimizations that seriously degrade the debug<br />

view. If used with --debug, this option gives a satisfactory debug view<br />

with good code density.<br />

2 High optimization. If used with --debug, the debug view might be less<br />

satisfactory because the mapping of object code to source code is not<br />

always clear.<br />

This is the default optimization level.<br />

3 Maximum optimization. -O3 performs the same optimizations as -O2<br />

however the balance between space and time optimizations in the<br />

generated code is more heavily weighted towards space or time compared<br />

with -O2. That is:<br />

• -O3 -Otime aims to produce faster code than -O2 -Otime, at the risk<br />

of increasing your image size<br />

• -O3 -Ospace aims to produce smaller code than -O2 -Ospace, but<br />

performance might be degraded.<br />

In addition, -O3 performs extra optimizations that are more aggressive,<br />

such as:<br />

• High-level scalar optimizations, including loop unrolling, for -O3<br />

-Otime. This can give significant performance benefits at a small<br />

code size cost, but at the risk of a longer build time.<br />

• More aggressive inlining and automatic inlining for -O3 -Otime.<br />

• Multifile compilation by default.<br />

Note<br />

The performance of floating-point code can be influenced by selecting an appropriate<br />

numerical model using the --fpmode option.<br />

<strong>ARM</strong> DUI 0348C Copyright © 2007-2010 <strong>ARM</strong>. All rights reserved. 2-97<br />

ID101213<br />

Non-Confidential,

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!