This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bad interaction between inlining and sibcall optimization?


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]