New option -flimit-function-alignment

Bernd Schmidt bschmidt@redhat.com
Tue Oct 11 14:11:00 GMT 2016


Denys has submitted some patches to add more capabilities to the 
-falign-* options, but these still have some issues, and the original 
ideas seems to have been to allow for large alignments without 
over-aligning small functions. The following patch implements that idea 
by taking into account the function size as computed during 
shorten_branches: let's say we use "-falign-functions=128 
-flimit-function-alignment", then a 15-byte function will be 16-byte 
aligned rather than 128-byte aligned.

Bootstrapped and tested on x86_64-linux. Denys, does this solve your 
problem? Anyone else, ok to commit?


Bernd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: limit-align.diff
Type: text/x-patch
Size: 4277 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161011/343bf1f1/attachment.bin>


More information about the Gcc-patches mailing list