similar to: [LLVMdev] opt -std-compile-opts breaks tail calls

Displaying 20 results from an estimated 6000 matches similar to: "[LLVMdev] opt -std-compile-opts breaks tail calls"

2009 Nov 12
0
[LLVMdev] opt -std-compile-opts breaks tail calls
On Wed, Nov 11, 2009 at 8:58 PM, Jon Harrop <jon at ffconsultancy.com> wrote: > > Is "opt" expected to honour tail calls? I don't believe tail call elimination is on by default. Did you try including the "-tailcallelim" option?
2009 Nov 12
4
[LLVMdev] opt -std-compile-opts breaks tail calls
tail calls are only implemented for fastcall calling convention if i remeber right from my inquiries. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091112/e8f1dd2a/attachment.html>
2009 Nov 13
0
[LLVMdev] opt -std-compile-opts breaks tail calls
I've run into some issues with tail calls in the past, make sure you are doing the following: 1. Call should be marked with tail (obviously) 2. Next statement after tail call should be 'return void' 3. Use fast call convention for tail calls 4. Make sure the function you are calling doesn't use the 'noreturn' attribute. 5. Turn on tail calls in llc (if using the static
2009 Nov 13
2
[LLVMdev] opt -std-compile-opts breaks tail calls
On Friday 13 November 2009 16:26:01 Chris Lattner wrote: > On Nov 13, 2009, at 3:34 AM, Jon Harrop wrote: > >> Point 4 is the one that caused me trouble for some time. > >> Unfortunately > >> it causes a bad interaction with the optimiser, specifically the > >> 'simplifycfg' pass. What seems to happen is that since the function > >> you are
2009 Nov 13
2
[LLVMdev] opt -std-compile-opts breaks tail calls
On Friday 13 November 2009 04:57:43 David Terei wrote: > I've run into some issues with tail calls in the past, make sure you > are doing the following: > > 1. Call should be marked with tail (obviously) > 2. Next statement after tail call should be 'return void' > 3. Use fast call convention for tail calls > 4. Make sure the function you are calling doesn't
2009 Nov 13
0
[LLVMdev] opt -std-compile-opts breaks tail calls
On Nov 13, 2009, at 9:07 AM, Jon Harrop wrote: > > I'll try removing the noalias and seeing if that fixes it. If so, I'll file a > bug report. Which part of LLVM would this be a bug in if things like noalias > and noreturn inhibit TCO when they shouldn't? CodeGen. I looked at noalias, and it was indeed a bug. This is now fixed on trunk in r88672. Noreturn is a
2009 Nov 13
0
[LLVMdev] opt -std-compile-opts breaks tail calls
Resent, to the list this time instead of David (sorry for the duplicate)... On Thu, Nov 12, 2009 at 9:57 PM, David Terei <davidterei at gmail.com> wrote: > I've run into some issues with tail calls in the past, make sure you > are doing the following: > > 1. Call should be marked with tail (obviously) > 2. Next statement after tail call should be 'return void'
2009 Nov 13
0
[LLVMdev] opt -std-compile-opts breaks tail calls
On Nov 13, 2009, at 3:34 AM, Jon Harrop wrote: >> Point 4 is the one that caused me trouble for some time. >> Unfortunately >> it causes a bad interaction with the optimiser, specifically the >> 'simplifycfg' pass. What seems to happen is that since the function >> you are calling is marked with 'noreturn', the simplifycfg pass will >> then
2009 Mar 28
0
[LLVMdev] Broke my tail (call)
On Tuesday 24 February 2009 14:54:12 Arnold Schwaighofer wrote: > On Tue, Feb 24, 2009 at 11:50 AM, Jon Harrop <jon at ffconsultancy.com> wrote: > > Thanks for the clarification. That makes a lot more sense! > > > > LLVM's support for structs is wonderful but I don't think they can be > > called "first-class structs" until all such arbitrary
2010 Jan 04
0
[LLVMdev] Tail Call Optimisation
On Monday 04 January 2010 05:16:40 Jeffrey Yasskin wrote: > On Sun, Jan 3, 2010 at 10:50 PM, Jon Harrop <jon at ffconsultancy.com> wrote: > > LLVM's TCO already handles mutual recursion. > > Only for fastcc functions Yes. > compiled with -tailcallopt, right? If you use the compiler, yes. > http://llvm.org/docs/CodeGenerator.html#tailcallopt > > I believe
2010 Jan 04
0
[LLVMdev] Tail Call Optimisation
On Monday 04 January 2010 03:33:06 Simon Harris wrote: > On 04/01/2010, at 3:01 PM, Jon Harrop wrote: > > I am certainly interested in tail calls because my HLVM project relies > > upon LLVM's tail call elimination. However, I do not understand what tail > > calls LLVM is not currently eliminating that you plan to eliminate? > > Mutual recursion for a start: >
2010 Jan 04
2
[LLVMdev] Tail Call Optimisation
On Sun, Jan 3, 2010 at 10:50 PM, Jon Harrop <jon at ffconsultancy.com> wrote: > On Monday 04 January 2010 03:33:06 Simon Harris wrote: >> On 04/01/2010, at 3:01 PM, Jon Harrop wrote: >> > I am certainly interested in tail calls because my HLVM project relies >> > upon LLVM's tail call elimination. However, I do not understand what tail >> > calls LLVM
2008 Dec 14
1
[LLVMdev] Tail calls from OCaml
How do you get a tail call using the OCaml's LLVM API? -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e
2009 Feb 25
0
[LLVMdev] Broke my tail (call)
On Tuesday 24 February 2009 20:05:52 Dan Gohman wrote: > "first-class" in this context means "Values can have this type", not > "everything that anyone might want is supported in all backends." Ok. > A meta issue is that LLVM IR differs from many virtual machine ISAs in > that it's more of a language for expressing programs than a > specification
2009 Feb 24
4
[LLVMdev] Broke my tail (call)
On Tue, Feb 24, 2009 at 11:50 AM, Jon Harrop <jon at ffconsultancy.com> wrote: > Thanks for the clarification. That makes a lot more sense! > > LLVM's support for structs is wonderful but I don't think they can be > called "first-class structs" until all such arbitrary restrictions have been > removed, even though the workaround (using sret form) is trivial
2009 Feb 22
3
[LLVMdev] Broke my tail (call)
I have written a variety tests of tail calls for my HLVM and all passed with flying colors until I wrote this test (which is actually for algebraic datatypes) and discovered that it segfaults after ~100k iterations through what I think should be a tail call. Here's the IR: define fastcc { { i8*, i8* }*, i8* } @init({ { i8*, i8* }*, i8* }, i32) { entry: %2 = alloca { i32, { { i8*,
2010 Dec 01
2
[LLVMdev] Tail calls not working with LLVM 2.8
I just upgraded HLVM from LLVM 2.7 to 2.8 and started seeing stack overflows so I think TCO isn't working. Have there been any obvious changes that would cause this? -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com
2009 Feb 23
3
[LLVMdev] Broke my tail (call)
On Mon, Feb 23, 2009 at 2:13 PM, Jon Harrop <jon at ffconsultancy.com> wrote: > Moreover, I now have evidence that LLVM is not behaving as you expect: > > 3. Adjusting the return value from this function into sret form results in > tail call elimination being performed correctly. Note that this is still > passing a first-class struct by value as an argument to a function
2009 Feb 24
0
[LLVMdev] Broke my tail (call)
On Monday 23 February 2009 16:14:57 Arnold Schwaighofer wrote: > The problem has to do with how struct returns are represented > internally by llvm (in the SelectionDAG) and how the tail call > optimization implementation checks if it may perform the tail call. > The implementation checks that the <call> node is immediately followed > by a <ret> node. A struct return
2010 Jan 04
0
[LLVMdev] Tail Call Optimisation
On Monday 04 January 2010 01:12:55 Simon Harris wrote: > I'm investigating "improving" the TCO facilities in LLVM to provide for > "hard" tail calls. Specifically, this would involve extending the existing > implementation to discard the stack frame for the caller before executing > the callee. I would then like to extend this further by performing hard >