Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Calling Conventions"
2007 Oct 04
3
[LLVMdev] RFC: Tail call optimization X86
Comments:
CheckDAGForTailCallsAndFixThem -
1.
for (SelectionDAG::allnodes_iterator BE = DAG.allnodes_begin(),
+ BI = prior(DAG.allnodes_end()); BI != BE; BI--) {
Please use pre-decrement instead of post-decrement.
2. The function is slower than it should be. You are scanning all the
nodes in the DAG twice. You should just examine DAG.getRoot() to make
determine whether it's a
2007 Sep 06
2
[LLVMdev] RFC: Tail call optimization X86
Hi Evan,
first off thanks to you and Chris for taking time.
On 6 Sep 2007, at 00:57, Evan Cheng wrote:
> We'd like to see tail call optimization to be similar to the target
> independent lowering of ISD::CALL nodes. These are auto-generated
> from ???CallingConv.td files. Some target specific details such as
> function address register (ECX in your example) should be coded in
2007 Oct 05
6
[LLVMdev] RFC: Tail call optimization X86
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. See Chris' email:
>
> I am not to sure on that. because that would make
2009 Dec 03
4
[LLVMdev] Win64 Calling Convention problem
Hi!
I have discovered a problem with LLVM's interpretation of the Win64
calling convention w.r.t. passing of aggregates as arguments. The
following code is part of my host application that is compiled with
Visual Studio 2005 in 64-bit debug mode. noise4 expects a structure of
four floats as its first and only argument, which is - in accordance
with the specs of the Win64 calling convention -
2009 Dec 03
1
[LLVMdev] Win64 Calling Convention problem
Hello
> I don't know. I feel reluctant to generate different IRs for Win32 and
> for Win64.
Unfortunately, you should. Think about differences and between
_Complex type and struct {double, double}.
>From LLVM's point of view these are same types, however many ABIs have
special rules for passing / returning _Complex,
this is possible to handle in frontend only.
> Since the C
2008 Apr 12
3
[LLVMdev] Calling Conventions Cont'd
What is the correct procedure for translating a function signature from
a high-order language to LLVM? It looks like I replace each
struct/array parameter with a 'byval' pointer parameter, and I replace a
result struct/array with an 'sret' pointer parameter. The reason I ask
is that each calling convention has subtle variations for each
architecture and platform. For
2007 Sep 11
0
[LLVMdev] RFC: Tail call optimization X86
Hi Arnold,
Thanks for the patch. Some questions and commons:
1. Have you test it against the llvm test suite? Does it work if fp
elimination optimization is turned off?
2. Please follow llvm coding convention and make sure every line fits
in 80 columns.
3.
enum NameDecorationStyle {
None,
StdCall,
- FastCall
+ FastCall,
+ FastCC // the normal fastcc calling convention
};
Why is
2007 Aug 09
4
[LLVMdev] Tail call optimization thoughts
Hello, Arnold.
Only quick comments, I'll try to make a full review a little bit later.
> 0.)a fast calling convention (maybe use the current
> CallingConv::Fast, or create a CallingConv::TailCall)
> 1.) lowering of formal arguments
> like for example x86_LowerCCCArguments in stdcall mode
> we need to make sure that later mentioned CALL_CLOBBERED_REG is
>
2005 Sep 21
2
cdecl and stdcall
Hi,
I'm trying to load a dynamic link library and it seems to work (is.loaded -> TRUE). When I run the function, which calls the .Fortran subroutine, R crashes!
I'v tried the same in S-Plus 2000 and it worked. Therefore I suppose that the dll has been compiled with the stdcall calling convention (and not cdecl). But the problem is that I don't have access to the source code,
2008 Apr 14
3
[LLVMdev] Calling Conventions Cont'd
Duncan Sands wrote:
> Hi Jon,
>
>> What is the correct procedure for translating a function signature from
>> a high-order language to LLVM?
>
> you have to do it carefully so that LLVM will end up producing object code
> that conforms to the platform ABI. For example, suppose you are using cdecl
> with a small struct (a pair of ints, say). Then your function
2007 Oct 05
0
[LLVMdev] RFC: Tail call optimization X86
On Oct 5, 2007, at 10:41 AM, 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
2009 Apr 03
1
[LLVMdev] php crash
I tried the version you used, too. the resulting executable was still broken.
I guess the reason is due to fastcall on function pointers, which
Clang does not recognize. Consider the following snippet.
#include <stdio.h>
void __attribute__((fastcall)) f(int i)
{
printf("%d\n", i);
}
typedef void (*__attribute__((fastcall)) f_t)(int i);
//typedef void
2009 Dec 03
0
[LLVMdev] Win64 Calling Convention problem
Hello
> When compiling this module with llc (Intel assembler syntax) I get the
> following code. As you can see, the float4 argument is not passed to
> the noise-function by pointer. Instead, noise is treated as if it
> expected four individual floats as arguments, which are passed in the
> registers XMM0-XMM3.
That's correct behaviour. ABI under question is C/C++ ABI and it is
2011 Mar 20
1
[LLVMdev] CDECL Calling Convention
Hello all,
I am a beginner of LLVM and I want to add a new backend into LLVM. The
calling convention of the target I ported is CDECL. I am wondering to know
whether there is already CDECL calling convention implemented in LLVM??
Which CallingConv.td file should I copy and modify for my target??
thanks a lot
Mitnick
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2013 Jul 25
4
[LLVMdev] Proposing a new 'alloca' parameter attribute to implement the Microsoft C++ ABI
Hi LLVM folks,
To properly implement pass-by-value in the Microsoft C++ ABI, we need to be
able
to take the address of an outgoing call argument slot. This is
http://llvm.org/PR5064 .
Problem
-------
On Windows, C structs are pushed right onto the stack in line with the other
arguments. In LLVM, we use byval to model this, and it works for C structs.
However, C++ records are also passed this
2009 Apr 03
2
[LLVMdev] php crash
On Fri, Apr 3, 2009 at 12:07 PM, Chris Lattner <clattner at apple.com> wrote:
> It is impossible to tell with this amount of detail. Does it work
> correctly if you build with -O0 ?
Yes, with -O0 the resulting executable looks fine. --enable-debug
actually sets -O0 (otherwise -O2).
Clang can build/test php 5.2.9 with either -O0 or -O2, but not for php
5.3RC0 with -O2. I further
2009 Apr 03
0
[LLVMdev] php crash
What version of clang are you using? It could be a regression between
head and the version I used. (some days old)
- Anders
On Fri, Apr 3, 2009 at 6:37 PM, Xi Wang <xi.wang at gmail.com> wrote:
> On Fri, Apr 3, 2009 at 12:07 PM, Chris Lattner <clattner at apple.com> wrote:
>> It is impossible to tell with this amount of detail. Does it work
>> correctly if you build
2008 Feb 20
1
[LLVMdev] Adding a custom calling convention
On 20/02/2008, Chris Lattner <sabre at nondot.org> wrote:
> On Wed, 20 Feb 2008, Raja Mukherji wrote:
> > Hi all,
> > I was wondering what the best way of adding a custom calling convention in llvm?
>
> It is quite easy to add custom calling conventions. Check out how the
> various x86 fastcall, stdcall, etc things are handled.
Am I correct in thinking that it's
2013 Feb 20
4
[LLVMdev] x86_stdcallcc @<n> mangling vs. '\1' prefix [was: x86_stdcallcc and extra name mangling on Windows]
I don't remember anything other that what I've written in the bug João
has mentioned.
Probably something like this patch
http://llvm.org/bugs/show_bug.cgi?id=14410#c6
?
2013/2/20 João Matos <ripzonetriton at gmail.com>:
> I think so. There have been other reports lately related to this being
> wrong.
>
> http://llvm.org/bugs/show_bug.cgi?id=14410
>
> CC'ing
2009 Jan 23
1
[LLVMdev] Problem invoking win32 api calls
Hi,
I use the kaliedoscope tutorial to do some experiments. I'm trying to define
a few win32 functions as extern and execute them from the toy language.
Functions that take no arguments execute fine (for example, GetLastError()).
However, calling functions that do take arguments (for example,
SetLastError(unsigned int)) always crash the application due to some kind of
stack corruption