[Bug target/97902] x86 frame pointer missing with -fno-omit-frame-pointer (-mno-omit-leaf-frame-pointer)
hjl.tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Nov 26 14:24:27 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97902
--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Richard Biener from comment #10)
> (In reply to Martin Liška from comment #9)
> > (In reply to H.J. Lu from comment #8)
> > > (In reply to Martin Liška from comment #7)
> > > > Can you please H.J. take a look?
> > > > Maybe we can add a param that will drive the beviour?
> > >
> > > I consider this optimization similar inlining or tail call.
> >
> > How is that related? I don't see the connection in behavior.
>
> You can't do backtracing with inlining (well, you'll lose those frames).
>
> Here one of the callers will have a correct frame and backtracing still
> works, no?
Backtrace works with inlining, tail call and this optimization.
> > > Should
> > > -fno-omit-frame-pointer disable them?
> >
> > I would prefer to revert the patch 8e941ae950ddce1745b4d6819a7131908dd7de24.
> > The reporter requested to preserve the frame pointer (with
> > -fno-omit-frame-pointer) for backtracing capability and we optimized it out.
> >
> > What do you think H.J. ?
>
> I don't think that's good. It's perfectly valid with optimization.
Agree.
> One could spec a -fforce-frame-pointer but then one needs to define what
> its guarantee is.
Should it disable tail call?
More information about the Gcc-bugs
mailing list