Visible to Intel only — GUID: GUID-69E0C011-4D61-4A21-A0D2-B94456DDB6AB
Visible to Intel only — GUID: GUID-69E0C011-4D61-4A21-A0D2-B94456DDB6AB
falign-loops, Qalign-loops
Aligns loops to a power-of-two byte boundary. This feature is only available for ifort.
Linux: |
-falign-loops[=n] -fno-align-loops |
macOS: |
-falign-loops[=n] -fno-align-loops |
Windows: |
/Qalign-loops[:n] /Qalign-loops- |
n |
Is the optional number of bytes for the minimum alignment boundary. It must be a power of 2 between 1 and 4096, such as 1, 2, 4, 8, 16, 32, 64, 128, and so on. If you specify 1 for n, no alignment is performed; this is the same as specifying the negative form of the option. If you do not specify n, the default alignment is 16 bytes. |
-fno-align-loops or /Qalign-loops- |
No special loop alignment is performed. |
This option aligns loops to a power-of-two boundary. This alignment may improve performance.
It can be affected by the directives CODE_ALIGN and ATTRIBUTES CODE_ALIGN.
If code is compiled with the -falign-loops=m (Linux* and macOS) or /Qalign-loops:m (Windows*) option and a CODE_ALIGN:n directive precedes a loop, the loop is aligned on a MAX (m, n) byte boundary. If a procedure has the CODE_ALIGN:k attribute and a CODE_ALIGN:n directive precedes a loop, then both the procedure and the loop are aligned on a MAX (k, n) byte boundary.
None
Example
Consider the following code fragment in file test_align_loops.f90:
DO J = 1, N
…
END DO
Compiling test_align_loops.f90 with the -falign-loops (Linux and macOS) or /Qalign-loops (Windows) compiler option aligns the code that begins the DO J loop on a (default) 16-byte boundary. If you do not specify this compiler option, the alignment of the loop is implementation-dependent and may change from compilation to compilation.