similar to: [LLVMdev] question about tail call elimination pass ..

Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] question about tail call elimination pass .."

2008 Aug 03
1
[LLVMdev] question about tail call elimination pass ..
Hi, createTailCallEliminationPass() is able to turn recursive functions into loops when the functions are written in tail recursive form. However, I'm unable to get it to convert mutually recursive functions to run without a growing stack. For example (in pseudo code)- define fact(n,result) if n < 2 then result else fact(n-1,result *n) is converted into a loop correctly. However
2008 Aug 04
1
[LLVMdev] Repost: question about tail call elimination pass
NOTE: My original post was MIME mangled. So I'm reposting it. Sorry for that. Hi, createTailCallEliminationPass() is able to turn recursive functions into loops when the functions are written in tail recursive form. However, I'm unable to get it to convert mutually recursive functions to run without a growing stack. For example (in pseudo code)- define fact(n,result) if n < 2
2014 May 08
3
[LLVMdev] Small problem with the tail call elimination pass
Hello everybody, On the documentation page for the tailcallelim pass you can read: "This pass transforms functions that are prevented from being tail recursive by an associative expression to use an accumulator variable, thus compiling the typical naive factorial or fib implementation into efficient code” However, I don’t see this behavior when trying to compile this variant of the
2011 Apr 17
2
Tail Call Elimination?
Dear R-programmers, I am trying to program a Newton-Raphson in R (yes, i will try GSL, not right now), and it would be a real boon if R had tail call elimination, so that a recursive program has a guarantee not to fail due to stack overflows, given how slow loops in R are. I did look at the documentation, but could not find a reason for it. Regards, Mohit Dayal Researcher Applied Statistics
2013 Aug 01
0
[LLVMdev] Tail calls (TCO) in PNaCL | PNaCl Bitcode reference manual
I'm not familiar with PNaCl but, FWIW, I'd say the three main advancements the CLR made over the JVM are: . Structs (aka value types). . Reified generics. http://research.microsoft.com/pubs/64031/designandimplementationofgenerics.p df . Tail call elimination. http://research.microsoft.com/pubs/69132/babel01.pdf Structs give you more freedom around memory
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: >
2008 Aug 12
0
[LLVMdev] crash in JIT when running the inliner
I ran into the same issue some time back and just made all functions with ExternalLinkage, which forced the inliner to not delete any functions and I got my code to run. In my interpreter, for every top level expression, I create a wrapper function that takes no arguments and then do EE->runFunction (just like in the tutorial). As the interaction proceeds, these wrapper functions remain in
2013 Apr 17
0
[LLVMdev] [polly] pass ordering
On 04/17/2013 09:04 PM, Sebastian Pop wrote: > Tobias Grosser wrote: >> As said before, we could probably add it in between those two passes: >> >> MPM.add(createReassociatePass()); // Reassociate expressions >> + addExtensionsToPM(EP_LoopOptimizerStart, MPM); >> MPM.add(createLoopRotatePass()); // Rotate Loop > > As this is in the middle of other
2010 Jan 04
3
[LLVMdev] Tail Call Optimisation
On 04/01/2010, at 3:01 PM, Jon Harrop wrote: > 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
2012 Feb 11
0
[LLVMdev] Remove an instruction through Dead Code Elimination pass of llvm
Hi Adarsh, On 11/02/12 09:47, Adarsh Konchady wrote: > My pass in LLVM generates an IR like this > %5 = icmp eq i32 %4, 0 > %7 = or i1 %5, %5 > ;. . . > Since the 'or' instruction is actually not needed(dead code), I replaced all > occurences of %7 with %5. > Now, the 'or' instruction should get deleted. How can I call Dead Code > Elimination pass
2015 Jul 09
3
[LLVMdev] PHI Elimination in Register Allocation Pass
Good Afternoon. I am a Computer Science undergraduate student in Brazil and as completion of course work, I am developing an register allocator, using the infrastructure of the LLVM. To accomplish this task, I have based my implementation in allocators already implemented in LLVM. But a question came to me while I was researching in books and articles of compiler theory and own documentation of
2006 Sep 03
0
[LLVMdev] llvm-gcc4: Enable various optimizations at -O1/-O2
Hi All, I have installed llvm-gcc4 patch to enable various llvm optimizations at -O1/-O2/-O3. This means instead of $ llvm-gcc4 --emit-llvm foo.c -o foo.bc $ opt foo.bc -o foo_optimized.bc $ llc foo_optimized.bc -o foo.o One can directly use $ llvm-gcc4 -O2 foo.c -o foo.o to get optimized foo.o - Devang + + if (optimize > 0) { + + +
2012 Feb 11
2
[LLVMdev] Remove an instruction through Dead Code Elimination pass of llvm
My pass in LLVM generates an IR like this %5 = icmp eq i32 %4, 0 %7 = or i1 %5, %5 ;. . . Since the 'or' instruction is actually not needed(dead code), I replaced all occurences of %7 with %5. Now, the 'or' instruction should get deleted. How can I call Dead Code Elimination pass of LLVM from my pass or is there any method to remove that 'or' instruction? Thank you.
2016 Mar 23
0
RFC: New aggressive dead code elimination pass
Can you give an example of a case that is missed today but catched by your pass? > On Mar 23, 2016, at 6:43 AM, David Callahan via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi, > > I have a new variant of Aggressive Dead Code Elimination that also removes dead branching. It is designed to minimize the cost of control-dependence analysis in the common case where
2016 Mar 25
0
RFC: New aggressive dead code elimination pass
Yeah, that was gonna be my question. If so, my view is we should just bite the bullet and start threading post dominance through the compiler. (assuming anyone wants to help. I'm tackling the memoryssa updating stuff with george ATM). On Thu, Mar 24, 2016 at 7:04 PM, Hal Finkel <hfinkel at anl.gov> wrote: > [+Danny] > > ----- Original Message ----- > > From:
2013 Sep 25
0
[LLVMdev] [Polly] Move Polly's execution later
Here is an update about moving Polly later. 1. Why does Polly generate incorrect code when we move Polly immediately after the loop rotating pass? It is mainly caused by a wrong polly merge block. When Polly detects a valid loop for Polyhedral transformations, it usually introduces a new basic block "polly.merge_new_and_old" after the original loop exit block. This new basic block
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
2016 Mar 23
0
RFC: New aggressive dead code elimination pass
David Callahan via llvm-dev <llvm-dev at lists.llvm.org> writes: > Hi, > > I have a new variant of Aggressive Dead Code Elimination that also > removes dead branching. It is designed to minimize the cost of > control-dependence analysis in the common case where almost the entire > program is live. It also can optionally remove dead but > may-be-infinite loops. > >
2016 Mar 25
2
RFC: New aggressive dead code elimination pass
[+Danny] ----- Original Message ----- > From: "Justin Bogner via llvm-dev" <llvm-dev at lists.llvm.org> > To: "David Callahan via llvm-dev" <llvm-dev at lists.llvm.org> > Sent: Wednesday, March 23, 2016 12:36:50 PM > Subject: Re: [llvm-dev] RFC: New aggressive dead code elimination pass > > David Callahan via llvm-dev <llvm-dev at
2013 Sep 25
3
[LLVMdev] [Polly] Move Polly's execution later
On 09/25/2013 04:55 AM, Star Tan wrote: > Here is an update about moving Polly later. Hi star tan, thanks for your report. > > 1. Why does Polly generate incorrect code when we move Polly immediately after the loop rotating pass? > > It is mainly caused by a wrong polly merge block. When Polly detects a valid loop for Polyhedral transformations, it usually introduces a new basic