[Bug c/84100] [7 Regression] Function __attribute__((optimize(align-loops=32))) gives spurious warning and is ignored
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Feb 19 13:17:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84100
--- Comment #12 from Martin Liška <marxin at gcc dot gnu.org> ---
(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.
More information about the Gcc-bugs
mailing list