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

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 12 01:36:07 PDT 2015


On Mon, Oct 12, 2015 at 03:22:20AM +0000, Kuperstein, Michael M wrote:
> 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.

Correct.

> 
> 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.

Many -Os users don't care about CFI directives and often disabling
unwind data anyway. OSX is kind of the odd man out here.

> 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.

I don't think it is debugging you have to worry about, but correctness
of unwind data? Debug frames don't use compact encoding?

Joerg


More information about the llvm-commits mailing list