search for: performtailcallopt

Displaying 20 results from an estimated 34 matches for "performtailcallopt".

2010 Feb 18
2
[LLVMdev] What happened to llvm::PerformTailCallOpt?
I'm just trying to test HLVM with the latest SVN of LLVM and discovered that llvm::PerformTailCallOpt has disappeared from the code but it is still referred to from LangRef.html. Where did it go? -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e
2010 Feb 18
0
[LLVMdev] What happened to llvm::PerformTailCallOpt?
On Feb 18, 2010, at 2:12 AM, Jon Harrop wrote: > > I'm just trying to test HLVM with the latest SVN of LLVM and discovered that > llvm::PerformTailCallOpt has disappeared from the code but it is still > referred to from LangRef.html. > > Where did it go? It got renamed to GuaranteedTailCallOpt, to better reflect what it actually represents. --Owen -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p...
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
2010 Feb 06
0
[LLVMdev] Removing -tailcallopt?
Evan Cheng wrote: > As far as I can tell only PPC and X86 targets are supporting this option. Does anyone actually using it? I'd prefer to just remove it to clean up the implementation if no one has any objections. Don't know whether that is the same, but my Pure compiler sets llvm::PerformTailCallOpt. Pure needs TCO because it doesn't have any built-in looping constructs. In fact, most functional language implementations will rely on TCO. If you can make this work reliably on all supported platforms without needing special flags, that would be welcome. Otherwise please keep the flag. (That...
2008 Sep 12
3
[LLVMdev] Tail-calling
.... The calling convention of the function needs to be CallingConv::Fast (currently only fastcc calls are optimized) and the call has to be in tail position of course. To enable tail call optimization in an embedded vm i guess you would include llvm/Target/TargetOptions.h and set the static variable PerformTailCallOpt to true. Take this with a grain of salt or two since i have never done it ;) but i guess that setting those globals is what cl::ParseCommandLineOptions does in lli/llc.cpp. regards arnold > Quick question, how do you enable tail calls for the JIT when using > the API, not an external app;...
2008 Mar 30
3
[LLVMdev] Being able to know the jitted code-size before emitting
Hi everyone, vmkit requires to know the size of a jitted method before emitting the method. This allows to allocate the correct size for the method. The attached patch creates this functionality when the flag SizedMemoryCode is on. In order to implement this functionality, i had to virtualize some MachineCodeEmitter functions. Is it OK to commit the patch? Thanks, Nicolas --------------
2008 Apr 01
2
[LLVMdev] Being able to know the jitted code-size before emitting
...ted. >> extern bool ExceptionHandling; >> >> + /// SizedMemoryCode - This flags indicates that memory for code >> is allocated by >> + /// an external allocator which requires the size to allocate >> + extern bool SizedMemoryCode; >> + >> /// PerformTailCallOpt - This flag is enabled when -tailcallopt is >> specified >> /// on the commandline. When the flag is on, the target will >> perform tail call >> /// optimization (pop the caller's stack) providing it supports it. >> Index: include/llvm/CodeGen/SizeEmitter.h...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...4,6 +74,10 @@ > /// be emitted. > extern bool ExceptionHandling; > > + /// SizedMemoryCode - This flags indicates that memory for code > is allocated by > + /// an external allocator which requires the size to allocate > + extern bool SizedMemoryCode; > + > /// PerformTailCallOpt - This flag is enabled when -tailcallopt is > specified > /// on the commandline. When the flag is on, the target will > perform tail call > /// optimization (pop the caller's stack) providing it supports it. > Index: include/llvm/CodeGen/SizeEmitter.h > ==============...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
...ol ExceptionHandling; >>> >>> + /// SizedMemoryCode - This flags indicates that memory for code >>> is allocated by >>> + /// an external allocator which requires the size to allocate >>> + extern bool SizedMemoryCode; >>> + >>> /// PerformTailCallOpt - This flag is enabled when -tailcallopt is >>> specified >>> /// on the commandline. When the flag is on, the target will >>> perform tail call >>> /// optimization (pop the caller's stack) providing it supports it. >>> Index: include/llvm/CodeGen...
2008 Sep 12
0
[LLVMdev] Tail-calling
...> Take this with a grain of salt or two since i have never done it ;) > but i guess that setting those globals is what > cl::ParseCommandLineOptions does in lli/llc.cpp. I can confirm that this is actually how it works (fastcc on the function + setTailCall on the call instruction + llvm::PerformTailCallOpt = true). I might add that of course you also have to make sure that the tail call is immediately before a ret instruction. :) Note that it also depends on the JIT for the target architecture whether this is actually supported. I verified that this does work on x86, -64. Not sure about the stat...
2010 Feb 06
2
[LLVMdev] Removing -tailcallopt?
...>> As far as I can tell only PPC and X86 targets are supporting this option. Does anyone actually using it? I'd prefer to just remove it to clean up the implementation if no one has any objections. > > Don't know whether that is the same, but my Pure compiler sets > llvm::PerformTailCallOpt. Pure needs TCO because it doesn't have any > built-in looping constructs. In fact, most functional language > implementations will rely on TCO. If you can make this work reliably on > all supported platforms without needing special flags, that would be > welcome. Otherwise please k...
2008 Apr 04
3
[LLVMdev] Being able to know the jitted code-size before emitting
...t;>> >>>> + /// SizedMemoryCode - This flags indicates that memory for code >>>> is allocated by >>>> + /// an external allocator which requires the size to allocate >>>> + extern bool SizedMemoryCode; >>>> + >>>> /// PerformTailCallOpt - This flag is enabled when -tailcallopt is >>>> specified >>>> /// on the commandline. When the flag is on, the target will >>>> perform tail call >>>> /// optimization (pop the caller's stack) providing it supports it. >>>> Index:...
2010 Feb 05
8
[LLVMdev] Removing -tailcallopt?
Hi all, I've added tail call optimization to x86. This is different from what -tailcallopt does, which forces fastcc function to be tail callable. My changes detect opportunities to do tail call without having to change the ABI. I've looked at the codegen of -tailcallopt and it doesn't look all that good. Running it as a llcbeta option shows it significantly pessimize code in most
2008 Sep 11
0
[LLVMdev] Tail-calling
On Thu, Sep 11, 2008 at 4:31 PM, Arnold Schwaighofer <arnold.schwaighofer at gmail.com> wrote: > 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. >
2008 Apr 05
2
[LLVMdev] Being able to know the jitted code-size before emitting
...dMemoryCode - This flags indicates that memory for code >>>>>> is allocated by >>>>>> + /// an external allocator which requires the size to allocate >>>>>> + extern bool SizedMemoryCode; >>>>>> + >>>>>> /// PerformTailCallOpt - This flag is enabled when -tailcallopt is >>>>>> specified >>>>>> /// on the commandline. When the flag is on, the target will >>>>>> perform tail call >>>>>> /// optimization (pop the caller's stack) providing it support...
2008 Apr 05
0
[LLVMdev] Being able to know the jitted code-size before emitting
...>>>>>>> code >>>>>>> is allocated by >>>>>>> + /// an external allocator which requires the size to allocate >>>>>>> + extern bool SizedMemoryCode; >>>>>>> + >>>>>>> /// PerformTailCallOpt - This flag is enabled when - >>>>>>> tailcallopt is >>>>>>> specified >>>>>>> /// on the commandline. When the flag is on, the target will >>>>>>> perform tail call >>>>>>> /// optimization (p...
2007 Sep 11
0
[LLVMdev] RFC: Tail call optimization X86
...cations to each operand. + SmallVector<CCValAssign, 16> ArgLocs; + CCState CCInfo(CC, isVarArg, getTargetMachine(), ArgLocs); + CCInfo.AnalyzeCallOperands(Op.Val, CC_X86_32_TailCall); + if (isTailCall && + IsEligibleForTailCallElimination(Op, DAG,CC, Callee) && + PerformTailCallOpt) { IsEligibleForTailCallElimination() should be a target hook. This way TargetLowering::LowerCallTo() can determine whether a call is eligible for tail call elimination and insert the current ISD::CALL node. X86TargetLowering::LowerX86_32FastCCCallTo() will not have to handle non-tail cal...
2008 Apr 04
0
[LLVMdev] Being able to know the jitted code-size before emitting
...>> + /// SizedMemoryCode - This flags indicates that memory for code >>>>> is allocated by >>>>> + /// an external allocator which requires the size to allocate >>>>> + extern bool SizedMemoryCode; >>>>> + >>>>> /// PerformTailCallOpt - This flag is enabled when -tailcallopt is >>>>> specified >>>>> /// on the commandline. When the flag is on, the target will >>>>> perform tail call >>>>> /// optimization (pop the caller's stack) providing it supports >>>...
2008 Apr 07
2
[LLVMdev] Being able to know the jitted code-size before emitting
...t;>> code >>>>>>>> is allocated by >>>>>>>> + /// an external allocator which requires the size to allocate >>>>>>>> + extern bool SizedMemoryCode; >>>>>>>> + >>>>>>>> /// PerformTailCallOpt - This flag is enabled when - >>>>>>>> tailcallopt is >>>>>>>> specified >>>>>>>> /// on the commandline. When the flag is on, the target will >>>>>>>> perform tail call >>>>>>>>...
2008 Sep 11
3
[LLVMdev] Tail-calling
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