Re: Frame pointer not getting eliminated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 28, 2019 at 3:07 PM Segher Boessenkool
<segher@xxxxxxxxxxxxxxxxxxx> 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



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux