This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: frame_pointer_needed always true ?
- From: Aurelien Buhrig <aurelien dot buhrig dot gcc at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 22 Jun 2016 18:13:58 +0200
- Subject: Re: frame_pointer_needed always true ?
- Authentication-results: sourceware.org; auth=none
- References: <71d774df-0705-de8f-1459-da54047e5deb at gmail dot com>
Hi,
> I'm porting a private backend from an old 4.6 gcc to the 6.1.0 release,
> and would appreciate an little help figuring out what may be wrong.
>
> In my backend prologue (6.1.0 release), I test frame_pointer_needed to
> figure out if the frame pointer is needed or not. But
> frame_pointer_needed is always true (even the function void f(void) {}
> which does not use any register), unless setting -fomit_frame_pointer.
>
> The TARGET_FRAME_POINTER_REQUIRED is defined to hook_bool_void_false,
> and the INITIAL_ELIMINATION_OFFSET, ELIMINABLE_REGS and
> TARGET_CAN_ELIMINATE seem to be correctly defined and elimination works
> correctly with -fomit-frame-pointer.
> I noticed that both my frame pointer and the stack pointer are marked
> live in; lr in and lr use for this empty function (post reload). I
> wonder if it is normal.
To be eliminated without -fomit-frame-pointer, shall the
FRAME_POINTER_REGNUM be different from HARD_FRAME_POINTER_REGNUM ?
I tried many things, but cannot figure out why my
HARD_FRAME_POINTER_REGNUM (which is not fixed) is always marked live
post reload... Any hint?
Thanks,
Aurelien