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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Compiler-specific Features<br />

Note<br />

Both vectorized and non vectorized loops can be unrolled using #pragma<br />

unroll_completely. That is, #pragma unroll_completely applies to both --no_vectorize<br />

and --vectorize.<br />

Usage<br />

When compiling at -O3 -Otime, the compiler automatically unrolls loops where it is<br />

beneficial to do so. You can use this pragma to request that the compiler completely<br />

unroll a loop that has not automatically been unrolled completely.<br />

Note<br />

Use this #pragma only when you have evidence, for example from<br />

--diag_warning=optimizations, that the compiler is not unrolling loops optimally by<br />

itself.<br />

Restrictions<br />

#pragma unroll_completely can only be used immediately before a for loop, a while<br />

loop, or a do ... while loop.<br />

Using #pragma unroll_completely on an outer loop can prevent vectorization. On the<br />

other hand, using #pragma unroll_completely on an inner loop might help in some cases.<br />

See also<br />

• --diag_warning=optimizations on page 2-49<br />

• -Onum on page 2-96<br />

• -Otime on page 2-99<br />

• --vectorize, --no_vectorize on page 2-131<br />

• #pragma unroll [(n)] on page 4-71<br />

• Optimizing loops on page 5-4 in the Compiler User Guide.<br />

4.6.26 #pragma thumb<br />

This pragma switches code generation to the Thumb instruction set. It overrides the<br />

--arm compiler option.<br />

If you are compiling code for a pre-Thumb-2 processor and using VFP, any function<br />

containing floating-point operations is compiled for <strong>ARM</strong>.<br />

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

ID101213<br />

Non-Confidential,

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

Saved successfully!

Ooh no, something went wrong!