This is the mail archive of the
mailing list for the GCC project.
Re: RFC: Turn on -fomit-frame-pointer and -fasynchronous-unwind-tables for Linux/i386
On Fri, Jul 16, 2010 at 05:21:16PM +0100, Dave Korn wrote:
> On 16/07/2010 09:13, Andi Kleen wrote:
> > (reference through %rbp is one byte smaller than through another GPR)
> > I believe MSVC does that and it's a useful optimization for x86.
> I can't tell if you meant x86_64 or %ebp but those two statements don't
> quite go together as-is! :)
The optimization is valid for 32bit and 64bit.
When you have a lot of variable references onto the stack it's smaller
to generate a frame pointer.
However on 64bit since there are more registers this should generally happen somewhat
less often, but there is always code that exceeds even the 16 registers on 64bit
The problem in gcc would be really to figure this out in advance.
email@example.com -- Speaking for myself only.