> Tail calls are disabled by default; to enable them, you have to pass > -tailcallopt to llc. It looks like there's a bug preventing indirect > tail calls from working... I don't think there's anything > fundamentally preventing them from working, though.I will not be using llc, it will all be through the C++ API. I looked through the code a bit, but could not see any real direct way to turn on tall-calls, the only thing I could really find was a single global (yes, a global... ugh...) that many things referenced, if I set that then things should use tail-call versions of things. What about this indirect bug, is anyone working on it? I would try, but I am quite certain I do not yet have the LLVM internals knowledge to (or even where to look).
Arnold implemented tail call. We should all urge him to continue his work to make it even better. :-) Evan On Sep 9, 2008, at 1:19 AM, OvermindDL1 wrote:>> Tail calls are disabled by default; to enable them, you have to pass >> -tailcallopt to llc. It looks like there's a bug preventing indirect >> tail calls from working... I don't think there's anything >> fundamentally preventing them from working, though. > > I will not be using llc, it will all be through the C++ API. I looked > through the code a bit, but could not see any real direct way to turn > on tall-calls, the only thing I could really find was a single global > (yes, a global... ugh...) that many things referenced, if I set that > then things should use tail-call versions of things. > > What about this indirect bug, is anyone working on it? I would try, > but I am quite certain I do not yet have the LLVM internals knowledge > to (or even where to look). > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Tail calls through function pointers should work.If not please send a testcase. I just added the two examples from the bug (1392) that calls for true tail call support. They work on my machine (-tailcallopt needs to be enabled) ;) That would be commit 56127. regards On Thu, Sep 11, 2008 at 11:21 PM, Evan Cheng <evan.cheng at apple.com> wrote:> Arnold implemented tail call. We should all urge him to continue his work to > make it even better. :-) > > Evan > > On Sep 9, 2008, at 1:19 AM, OvermindDL1 wrote: > >>> Tail calls are disabled by default; to enable them, you have to pass >>> -tailcallopt to llc. It looks like there's a bug preventing indirect >>> tail calls from working... I don't think there's anything >>> fundamentally preventing them from working, though. >> >> I will not be using llc, it will all be through the C++ API. I looked >> through the code a bit, but could not see any real direct way to turn >> on tall-calls, the only thing I could really find was a single global >> (yes, a global... ugh...) that many things referenced, if I set that >> then things should use tail-call versions of things. >> >> What about this indirect bug, is anyone working on it? I would try, >> but I am quite certain I do not yet have the LLVM internals knowledge >> to (or even where to look). >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >