--- Comment #12 from Martin Liška <marxin at gcc dot> ---
(In reply to Chris Hall from comment #11)
> FWIW:  __attribute__((aligned(32))) works nicely for functions.

You are right, that works fine! It should be equal to use

#pragma GCC optimize "align-functions=128"

or the corresponding attribute.

> Generally there is little to be gained from aligning all loops/jumps/labels
> in a given function or group of functions.
> Further, when code alignment issues bite, there is no guarantee that the
> solution is to align all loops/jumps/labels in the same way.
> So, it would be nice to be able to apply __attribute__((aligned(n))) to
> loops and/or labels... and perhaps to blocks.  That way, precise alignment
> could be applied precisely where it matters.
> I have been doing some detailed timing of relatively small operations, which
> of course involves a loop to do the operation being timed many times.  If
> the timing loop is not 32-byte aligned, the timings I get are not stable.

Such fine grained control would be nice, but it's very problematic to track
such information from a front-end to back-end where the real alignment happens.

Reply via email to