[llvm] r249522 - [X86] Emit .cfi_escape GNU_ARGS_SIZE when adjusting the stack before calls

Kuperstein, Michael M via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 11 20:22:20 PDT 2015


I'm not sure whether forcing FP is by itself helpful for size or not. 
On the one hand, we lose a register, potentially adding more spill code. On the other hand, ebp-relative addresses encode 1 byte smaller than esp-relative addresses. So, it really depends on the workload.

The question isn't whether -fno-omit-frame-pointer on its own helps size, it's whether it hurts code size. If not, then it may be the cheapest solution to the problem: turning off push optimization when EH is enabled would definitely hurt code size, and so would adding lots of CFI directives.
Also, this is the only solution I see (except turning push optimization off completely, since we can't turn it off based on -g) that would result in debuggable -Os executables on Darwin.

Michael

-----Original Message-----
From: Joerg Sonnenberger [mailto:joerg at britannica.bec.de] 
Sent: Sunday, October 11, 2015 18:36
To: Kuperstein, Michael M
Cc: friss at apple.com; rnk at google.com; llvm-commits at lists.llvm.org
Subject: Re: [llvm] r249522 - [X86] Emit .cfi_escape GNU_ARGS_SIZE when adjusting the stack before calls

On Sun, Oct 11, 2015 at 10:57:08AM +0000, Kuperstein, Michael M via llvm-commits wrote:
> Err, I'm sorry, that's wrong - Darwin shouldn't change code generation based on -g either.
> 
> So, that means I see the following options:
> 
> 1) Always force FP for -Os. 
> This (and please correct me if I'm wrong) should fix all functional problems, including Darwin, but looks really drastic.

I'm not convinced this actually helps size in all or even most cases.

Joerg
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



More information about the llvm-commits mailing list