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: What does it mean "ppc backend doesn't support sibcalls" ?


Hi, All.
Excuse me for probably very stupid question, but anyway...
I sent report about sibling and tail recursive calls to GNATS (7005)
and got an answer:
x86 silliness fixed for 3.2.
ppc backend doesn't support sibcalls
Could somebody please explain me what does it mean
"ppc backend doesn't support sibcalls".
Does it mean "this optimization is not applicable for this architecture" ?
Why ? As far as know PPC assembly and ABI/EABI this optimization
is perfectly applicable. Am I overlooking something ?
Does it mean "GCC code generator module for PPC is not ready for
this optimization" ? Can it be fixed ? When ?
Does it mean something else ?

Thanks.
==============
Felix Shvaiger
fshvaige@cisco.com
I believe that your second meaning (GCC's code generator module for PPC is not
ready for this optimization) is correct.  I'm not an expert on the PowerPC
backend, but it doesn't seem to have any of the required support for performing
sibcall optimizations.  I don't know whether there are any plans to fix this,
or even if it can be done, although I would assume that someone would eventually
like to fix this if possible.

I suppose the PowerPC ABI might prevent sibling-call optimization from being
done, or from being done in the fashion that GCC would like, but someone with
better knowledge of the ABI, the backend, and the details of sibcall
optimization would have to answer that.

(Richard, you wrote the comment the user is referring to; can you give a more
detailed explanation?)


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