5.7.7.9 Align-labels Option

The -falign-labels=n option aligns all branch targets to the next power-of-two greater than n, skipping up to n bytes. For instance, -falign-labels=8 aligns functions to the next 8-byte boundary; -falign-functions=9 aligns functions to the next 16-byte boundary but only if this can be done by skipping no more than 9 bytes.

This option can easily make code slower, because it must insert dummy operations for when the branch target is reached in the usual flow of the code.

If the options -falign-loops or -falign-jumps have been used and either of their arguments are greater than n, then their argument values are used to determine the label alignment instead.

This option is automatically enabled at optimization levels -O2 and -O3.

The -fno-align-labels form of this option is equivalent to -falign-labels=1 and implies that functions are not aligned. The -falign-labels form of this option (with no argument) also performs no alignment.