This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: bad interaction between inlining and sibcall optimization?
- To: David Mosberger <davidm at hpl dot hp dot com>
- Subject: Re: bad interaction between inlining and sibcall optimization?
- From: Richard Henderson <rth at redhat dot com>
- Date: Mon, 26 Mar 2001 18:34:47 -0800
- Cc: gcc-bugs at gcc dot gnu dot org, davidm at napali dot hpl dot hp dot com
- References: <200103232104.NAA24193@napali.hpl.hp.com>
On Fri, Mar 23, 2001 at 01:04:08PM -0800, David Mosberger wrote:
> On a related note, it appears to me that the following code in sibcall.c:
>
> /* We must be careful with stack slots which are live at
> potential optimization sites.
>
> ?!? This test is overly conservative and will be replaced. */
> if (frame_offset)
> goto failure;
>
> prevents this optimization from being used whenever the callee needs a
> stack frame.
Not precisely. More accurately, it prevents the optimization if the caller
needs a stack frame before register allocation. We've not allocated spill
slots or other stuff associated with the prologue yet.
If frame_offset is true at this point, you've either got variables with their
address taken, or large objects that don't fit into registers.
r~