Frame pointer not getting eliminated
William Tambe
tambewilliam@gmail.com
Fri Mar 29 02:55:00 GMT 2019
On Thu, Mar 28, 2019 at 3:07 PM Segher Boessenkool
<segher@kernel.crashing.org> wrote:
>
> 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)?
-O2 is being used; I can't tell whether -fomit-frame-pointer is being used.
>
> > #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?
I am passing function call arguments through the stack; I assumed that
HARD_FRAME_POINTER_REGNO would not need to be defined.
The FRAME_POINTER is not a hardware register; I wished to eliminate it
into the STACK_POINTER hardware register.
>
>
> Segher
More information about the Gcc-help
mailing list