Frame pointer not getting eliminated

Segher Boessenkool segher@kernel.crashing.org
Fri Mar 29 00:05:00 GMT 2019


Hi!

On Thu, Mar 28, 2019 at 12:26:13PM -0500, William Tambe wrote:
> I am doing porting work and writing a backend using GCC 8.2.0.
> 
> Despite the following #defines, the frame pointer is not getting
> eliminated; any idea why GCC would still generate a frame pointer ?

Do you use -fomit-frame-pointer (perhaps indirectly from -O, or from a
default)?

> #undef TARGET_FRAME_POINTER_REQUIRED
> #define TARGET_FRAME_POINTER_REQUIRED hook_bool_void_false

This is the default for this hook, you don't need this.

> #define ELIMINABLE_REGS  \
>           {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
>            {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
>            {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}}

Maybe you need to define HARD_FRAME_POINTER as well?  Or is FRAME_POINTER
a hardware register for you?


Segher



More information about the Gcc-help mailing list