On 10/14/2016 12:28 PM, Bernd Schmidt wrote:
On 10/12/2016 09:27 PM, Denys Vlasenko wrote:
Yes, something like "if max_skip >= func_size, temporarily lower
max_skip to func_size-1" (because otherwise we can create padding
bigger-or-equal to the entire function in size, which is stupid
- it's better to just put the function in that space).

This would be a nice.

That would be this patch. Bootstrapped and tested on x86_64-linux, ok?


Bernd

limit-align-v2b.diff


gcc/
        * common.opt (flimit-function-alignment): New.
        * doc/invoke.texi (-flimit-function-alignment): Document.
        * emit-rtl.h (struct rtl_data): Add max_insn_address field.
        * final.c (shorten_branches): Set it.
        * varasm.c (assemble_start_function): Limit alignment if
        requested.

gcc/testsuite/
        * gcc.target/i386/align-limit.c: New test.
OK.  Sorry for the long delay.

jeff

Reply via email to