similar to: [LLVMdev] how to turn off the tail optimization

Displaying 20 results from an estimated 60000 matches similar to: "[LLVMdev] how to turn off the tail optimization"

2012 Feb 28
0
[LLVMdev] how to turn off the tail optimization
Hi Wei, > It seems to me that LLVM is merging/in-lining the tail function to its > caller. > I am wondering if there is a flag that I can use to turn off this > optimization? do you want to turn off all inlining, or only inlining of calls that are tail calls? Why do you want to turn it off? Ciao, Duncan.
2016 Jun 28
0
Tail call optimization is getting affected due to local function related optimization with IPRA
> On Jun 28, 2016, at 11:34 AM, Mehdi Amini via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > > > Sent from my iPhone > > On Jun 28, 2016, at 2:27 PM, Matthias Braun <matze at braunis.de <mailto:matze at braunis.de>> wrote: > >> >>> On Jun 28, 2016, at 10:09 AM, Mehdi Amini via llvm-dev <llvm-dev at lists.llvm.org
2016 Jun 28
0
Tail call optimization is getting affected due to local function related optimization with IPRA
> On Jun 28, 2016, at 10:09 AM, Mehdi Amini via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > > > Sent from my iPhone > > On Jun 28, 2016, at 12:53 PM, vivek pandya <vivekvpandya at gmail.com <mailto:vivekvpandya at gmail.com>> wrote: > >> >> >> On Tue, Jun 28, 2016 at 8:11 PM, Mehdi Amini <mehdi.amini at apple.com
2016 Jun 28
2
Tail call optimization is getting affected due to local function related optimization with IPRA
Sent from my iPhone > On Jun 28, 2016, at 2:27 PM, Matthias Braun <matze at braunis.de> wrote: > > >> On Jun 28, 2016, at 10:09 AM, Mehdi Amini via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> >> >> >> Sent from my iPhone >> >>> On Jun 28, 2016, at 12:53 PM, vivek pandya <vivekvpandya at gmail.com> wrote:
2016 Jun 29
0
Tail call optimization is getting affected due to local function related optimization with IPRA
I have tried out the following code which examines each call site in a module for tail call and do not perform optimization in such case: On Wed, Jun 29, 2016 at 12:34 AM, Mehdi Amini <mehdi.amini at apple.com> wrote: > > On Jun 28, 2016, at 3:01 PM, Matthias Braun <matze at braunis.de> wrote: > > > On Jun 28, 2016, at 11:34 AM, Mehdi Amini via llvm-dev < >
2020 Oct 03
2
Another tail call optimization question
Hello, Could anyone kindly explain to me why the 'g()' in the following function cannot have tail call optimization? > void f(int* x); > void g(); > void h(int v) { > f(&v); > g(); > } > A while ago I was taught that tail call optimization cannot apply if local variables needs to be kept alive, but 'g()' doesn't seem to require anything to be
2008 Jun 11
0
[LLVMdev] Query on optimization and tail call.
On Tue, Jun 10, 2008 at 11:07 PM, Mahadevan R <mdevan.foobar at gmail.com> wrote: > int sum(int n) > { > return n + sum(n-1); > } > > it generates this: > > define i32 @sum(i32 %n) nounwind { > entry: > %tmp2 = add i32 %n, -1 ; <i32> [#uses=1] > %tmp3 = tail call i32 @sum( i32 %tmp2 ) nounwind ; <i32>
2016 Jun 28
2
Tail call optimization is getting affected due to local function related optimization with IPRA
> On Jun 28, 2016, at 3:01 PM, Matthias Braun <matze at braunis.de> wrote: > >> >> On Jun 28, 2016, at 11:34 AM, Mehdi Amini via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: >> >> >> >> Sent from my iPhone >> >> On Jun 28, 2016, at 2:27 PM, Matthias Braun <matze at braunis.de
2008 Jun 11
4
[LLVMdev] Query on optimization and tail call.
Hi, While playing around on the LLVM, I tried this code: int sum(int n) { if (n == 0) return 0; else return n + sum(n-1); } and this is what "llvm-gcc -O2" gave me: define i32 @sum(i32 %n) nounwind { entry: %tmp215 = icmp eq i32 %n, 0 ; <i1> [#uses=1] br i1 %tmp215, label %bb10, label %tailrecurse.bb10_crit_edge tailrecurse.bb10_crit_edge: ; preds =
2006 Jul 15
1
[LLVMdev] tail call optimization
compiling: void f(void); void g(void) { f(); } With GCC 4.0.3 (-Os) produces the code pushl %ebp movl %esp, %ebp popl %ebp jmp f With llvm-gcc the result is subl $4, %esp call f addl $4, %esp ret Note that llvm-gcc automatically removes the frame pointer, but doesn't use a tail call as GCC does. LLVM has
2007 Oct 05
2
[LLVMdev] RFC: Tail call optimization X86
On Oct 5, 2007, at 10:56 AM, Arnold Schwaighofer wrote: > >> We can set a policy of treating fastcc external functions >> as c functions. Then there is no chance of introducing ABI >> incompatibility. > this means limiting tail call opt to protected/invisible functions > within a module? > a little limiting i think. It makes sense to be extra careful at this point.
2016 Nov 27
3
llvm optimizer turning musttail into tail
r287955 seems like it might be related. -- Sean Silva On Sat, Nov 26, 2016 at 4:06 PM, Sean Silva <chisophugis at gmail.com> wrote: > This sounds buggy to me. What pass is doing this? > > -- Sean Silva > > On Thu, Nov 24, 2016 at 5:39 AM, Carlo Kok via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> >> I've got some calls like: >>
2013 Oct 31
3
[LLVMdev] Preserving accurate stack traces with optimization?
On 10/30/13 7:09 PM, Philip Reames wrote: > David, Quentin - Thanks for the feedback. Responses inline. > > On 10/30/13 11:21 AM, David Blaikie wrote: >> Actually CCing Eric. >> >> >> On Wed, Oct 30, 2013 at 11:00 AM, Quentin Colombet >> <qcolombet at apple.com <mailto:qcolombet at apple.com>> wrote: >> >> Philip, >>
2011 Dec 22
1
[LLVMdev] tail call optimization question
Hello, Is tail call optimization performed if the ret instruction does not actually follow the tail call? Not according to the documentation, but in examples it seems to work. For example, consider the following definition of Ackerman's function in ML (it has two tail calls): let rec ack x y = if x <= 0 then y + 1 else if y <= 0 then ack (x - 1) 1 else ack (x - 1) (ack x (y -
2007 Oct 05
0
[LLVMdev] RFC: Tail call optimization X86
On 5 Oct 2007, at 20:47, Evan Cheng wrote: > > On Oct 5, 2007, at 10:56 AM, Arnold Schwaighofer wrote: > >> >>> We can set a policy of treating fastcc external functions >>> as c functions. Then there is no chance of introducing ABI >>> incompatibility. >> this means limiting tail call opt to protected/invisible functions >> within a module?
2007 Oct 05
1
[LLVMdev] RFC: Tail call optimization X86
On 2007-10-05, at 13:56, Arnold Schwaighofer wrote: > On 5 Oct 2007, at 19:41, Evan Cheng wrote: > >> In theory, any function can be marked fastcc. But llvm-gcc c / c++ >> frontend does *not* mark any external functions fastcc. Also, the >> optimizer only changes the calling convention of internal >> functions to fastcc. > > well i hope llvm-gcc won't
2016 Nov 24
3
llvm optimizer turning musttail into tail
I've got some calls like: musttail call void bitcast (i32 (i32, i8*, %Type*)* @MyMethod to void (i32, i8*)*)(i32 %0, i8* %1) ret void Into something like: %8 = tail call i32 @MyMethod(i32 %0, i8* %1, %Type* null) ret void I realize I'm losing a parameter there, but this is an interface jump trick I use and relies on the end code being a 'jmp' (x86). I realize i can probably
2007 Oct 12
1
[LLVMdev] .ll test cases for tail call optimization in test-suite
On 12 Oct 2007, at 07:07, Evan Cheng wrote: >>In order to test the tail call optimization i created quite a few >>.ll files and added them to the SingleSource directory in the >>test-suite. For example >>llvm-test/SingleSource/Tailcall/tailcall1-2.ll. >Shouldn't these be dejagnu tests instead? There is one test in dejagnu that tests whether tail call optimization
2016 Jun 28
2
Tail call optimization is getting affected due to local function related optimization with IPRA
Sent from my iPhone > On Jun 28, 2016, at 12:53 PM, vivek pandya <vivekvpandya at gmail.com> wrote: > > > >> On Tue, Jun 28, 2016 at 8:11 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: >> >>> On Jun 27, 2016, at 12:25 PM, vivek pandya <vivekvpandya at gmail.com> wrote: >>> >>> Hello , >>> >>> To solve
2007 Oct 05
0
[LLVMdev] RFC: Tail call optimization X86
On 5 Oct 2007, at 19:41, Evan Cheng wrote: > > On Oct 5, 2007, at 2:42 AM, Arnold Schwaighofer wrote: > >> Hi Evan, >> I incoporated the changes you request but to the following i have got >> a question: >> >>> Also, moving the option >>> there will allow us to change fastcc ABI (callee popping arguments) >>> only when this option is on.