Hi,

I'm porting a private backend from an old 4.6 branch to the 6.1.0
release, and I have some troubles eliminating my frame pointer without
-fomit-frame-pointer option.
Elimination is correctly done with -fomit-frame-pointer.

For an empty function (i.e. void f(void) {}), my hardware frame pointer
is marked live and frame_pointer_required is true when generating the
prologue. Nothing in the rtl dump uses the hardware FP,
hardware_frame_pointer is not fixed, can_eliminate and is always true,
and TARGET_FRAME_POINTER_REQUIRED always false...
The documentation indicates that "in certain cases,  the compiler does
not know how to produce valid code without a frame pointer.  The
compiler recognizes those cases and automatically gives the function a
frame pointer regardless of what TARGET_FRAME_POINTER_REQUIRED returns."
What are theses certain cases?

Have there been some changes in reg elimination I would have missed
since 4.6?
Or just could I get some advice about how I could debug this?

Thanks in advance!
Cheers,
Aurelien

Reply via email to