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]
Other format: [Raw text]

Re: PATCH turning FUNCTION_OK_FOR_SIBCALL into target hook


> Applied.

Thank you.  However, I did not include the updated documentation in my
last email.  Please find the changes attached to this message.  Hope it's
alright.

I'm looking forward to your feedback.

Cheers,
Andi.

2002-10-03  Andreas Bauer  <baueran@in.tum.de>

	doc/tm.texi (FUNCTION_OK_FOR_SIBCALL): Remove.
	(TARGET_FUNCTION_OK_FOR_SIBCALL): New.

Index: tm.texi
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/doc/tm.texi,v
retrieving revision 1.159.2.7
diff -u -p -r1.159.2.7 tm.texi
--- tm.texi     1 Oct 2002 17:32:35 -0000       1.159.2.7
+++ tm.texi     3 Oct 2002 06:46:26 -0000
@@ -4228,18 +4228,18 @@ the function prologue.  Normally, the pr
 @subsection Permitting tail calls
 @cindex tail calls
 
-@table @code
-@findex FUNCTION_OK_FOR_SIBCALL
-@item FUNCTION_OK_FOR_SIBCALL (@var{decl})
-A C expression that evaluates to true if it is ok to perform a sibling
-call to @var{decl} from the current function.
+@deftypefn {Target Hook} bool TARGET_FUNCTION_OK_FOR_SIBCALL (tree @var{decl}, 
tree @var{exp})
+True if it is ok to do sibling call optimization for the specified
+call expression @var{exp}.  @var{decl} will be the called function,
+or NULL if this is an indirect call.
 
 It is not uncommon for limitations of calling conventions to prevent
 tail calls to functions outside the current unit of translation, or
-during PIC compilation.  Use this macro to enforce these restrictions,
+during PIC compilation.  The hook is used to enforce these restrictions,
 as the @code{sibcall} md pattern can not fail, or fall over to a
-``normal'' call.
-@end table
+``normal'' call.  The criteria for successful sibling call optimization
+may vary greatly between different architectures.
+@end deftypefn
 
 @node Varargs
 @section Implementing the Varargs Macros


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