This is the mail archive of the gcc@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: sibcall/tailcall terminology


> Proposal A:
> I propose that we use "tail call" to mean (3)
> and "sibling call" to mean (2).
> 
> As a consequence:
> 	- sibcall.c should renamed tailcall.c
> 	- -foptimize-sibling-calls should be renamed -foptimize-tail-calls
> 	  (or perhaps -foptimize-tailcalls?)
> 	- try_tail_call in calls.c should be renamed try_sibling_call
> 
> Proposal B:
> Alternatively, we could use "sibling call" to mean (3)
> and "tail call" to mean (2).  In that case:
> 	- OK_FOR_SIBCALL should be renamed OK_FOR_TAILCALL
> 	- sibcall_epilogue should be renamed tailcall_epilogue
> 	etc.
> 
> I prefer Proposal A.

I prefer proposal B, sort of.  What I have done in my patch (which, of
course is not part of current GCC) and my current work is rename some
flags and variables to reflect the subtle difference between sibcalls,
tail calls in general, and tail recursive calls.  IMHO, that's enough
to understand the sources and no one needs to rename the files.

And yes, I'm also getting confused whether I should use tailcalls,
tail-calls, and TAILCALL or TAIL_CALL, etc.  :-)

Andi.


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