[LLVMdev] Removing -tailcallopt?
jon at ffconsultancy.com
Fri Feb 5 22:27:51 CST 2010
On Saturday 06 February 2010 02:42:47 Evan Cheng wrote:
> On Feb 5, 2010, at 7:19 PM, Jon Harrop wrote:
> > On Friday 05 February 2010 23:35:15 Evan Cheng wrote:
> >> Does anyone actually using it?
> > Yes, many LLVM-based projects rely upon TCO to work correctly.
> Ok, that's all I need to know.
> >> I'd prefer to just remove it to clean up the implementation if no one
> >> has any objections.
> > Are you saying that you want to remove LLVM's working TCO and replace it
> > with something that is faster but broken?
> No, I'd rather have something that's working and helps performance.
I should also mention that tail call optimization is an optimization in space
and not time: it typically degrades performance (e.g. 2x slower on .NET).
If you want to improve the performance of tail calls you could either hack the
existing TCO implementation to make it generate more efficient code, or
circumvent it when you spot a special case (e.g. direct tail call to self)
that can be optimized.
Dr Jon Harrop, Flying Frog Consultancy Ltd.
More information about the LLVMdev