Technical data

Cray Standard C/C++ Reference Manual
instruction buffers, no additional instruction buffer fetches will be necessary
while the function executes.
The code resulting from an inlined function is not aligned, even if the functions
name is specified on an align directive. The performance improvement
obtained by aligning code on an instruction buffer is generally insignificant when
compared to that obtained by inlining.
The -h align option can be used to specify that all functions defined in the
file are to be aligned automatically on instruction buffer boundaries (see Section
2.13.3, page 24).
3.10.1.2 Loop Alignment
The compiler automatically aligns loops when it determines that this will
increase performance. It aligns any loops that fit into and require all of the
machines instruction buffers, because the best performance improvement results
from executing a loop entirely from within the buffers.
You can specify alignment of a particular loop by using the align directive.
For loop alignment, the align directive must appear in local scope and has
the following form:
#pragma _CRI align
The align directive is especially useful for small loops that fit entirely into
the machines instruction buffers. By using this directive, you can ensure that
such loops are executed entirely within the instruction buffers available on the
machine. After the executable code for the loop has been read into the instruction
buffers, no additional instruction buffer fetches are necessary while the loop
executes.
The compiler does not automatically align any of the following kinds of loops:
if...goto loops
Loops containing function calls, unless all function calls have been inlined
In addition, automatic loop aligning is disabled when the -h scalar0, -O0,
-Gn, and -g options are specified.
Because the compiler automatically aligns loops, for most programs you will
never need to use the align directive. However, at times it is desirable to align
88 S217936