This is the mail archive of the gcc-patches@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: tail call optimizations



rth@cygnus.com said:
> Here's the final version, which I've just checked in.  

Excellent.  Now I can start to remove the hack that is in the ARM backend, 
but only worked for some highly restricted cases.

However:

1) calls.c makes reference to md patterns sibcall, sibcall_value, 
sibcall_pop, sibcall_value_pop and sibcall_epilogue.  Only the last of 
these has any documentation in md.texi.  What do the others do?  What form 
do they take?

2) Can I assume that the compiler proper will not try to make a sibcall if 
the function might be passed the address of something in the current frame 
(eg address of a local variable, result of alloca())?

3) md.texi says

  "The @code{sibcall_epilogue} pattern must not clobber any arguments used
  for parameter passing or any stack slots for arguments passed to the
  current function."

Maybe I've missed the point here, but how can I be sure that I won't do 
the latter?  After all, the stack frame has to unwound by the epilogue 
instructions.

R.

PS.  You, or was it Mark, said that some of the code would probably go 
when we moved to a tree-based implementation.  Will that still work with 
tail-calling libcalls?  (For that matter, does the current implementation 
work with libcalls?)




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