[LLVMdev] Removing -tailcallopt?

Dan Gohman gohman at apple.com
Fri Feb 5 17:20:46 PST 2010


On Feb 5, 2010, at 3:35 PM, Evan Cheng wrote:

> Hi all,
> 
> I've added tail call optimization to x86. This is different from what -tailcallopt does, which forces fastcc function to be tail callable. My changes detect opportunities to do tail call without having to change the ABI.
> 
> I've looked at the codegen of -tailcallopt and it doesn't look all that good. Running it as a llcbeta option shows it significantly pessimize code in most cases.
> 
> As far as I can tell only PPC and  X86 targets are supporting this option. Does anyone actually using it?  I'd prefer to just remove it to clean up the implementation if no one has any objections.

Right now, -tailcallopt is the way to get guaranteed tail calls.
For projects which need this, it's not an optimization; it's a
correctness requirement.

Dan





More information about the llvm-dev mailing list