similar to: [LLVMdev] [PATCH] LangRef: va_arg doesn't work on X86_64; update example

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] [PATCH] LangRef: va_arg doesn't work on X86_64; update example"

2014 Aug 26
2
[LLVMdev] [BUG] Varargs example in LangRef segfaults
Hi, So the Variable Argument Handling Intrinsics section of the LangRef (http://llvm.org/docs/LangRef.html#variable-argument-handling-intrinsics) lists an example that segfaults. Try the following on x86_64: -- 8< -- define i32 @test(i32 %X, ...) { ; Initialize variable argument processing %ap = alloca i8* %ap2 = bitcast i8** %ap to i8* call void @llvm.va_start(i8* %ap2) ; Read a
2016 May 31
0
va_arg on Windows 64 bits
Hi everyone, I'm interested in variadic functions and how llvm handles them. I discovered that the Clang frontend is doing a great job at lowering the va_arg (precisely __builtin_va_arg) function into target dependent code. I have also seen the va_arg function that exist at IR level. I found some information about va_arg (IR one) that currently does not support all platform. But since 2009,
2016 Apr 20
3
va_arg on Windows 64
Hi everyone, I'm interested in variadic functions and how llvm handles them. I discovered that the Clang frontend is doing a great job at lowering the va_arg (precisely __builtin_va_arg) function into target dependent code. I have also seen the va_arg function that exist at IR level. I found some information about va_arg (IR one) that currently does not support all platform. But since 2009,
2007 Oct 24
0
[LLVMdev] va_arg on x86-64
Hi everybody. I'm developing a D compiler using LLVM as backend (LLVMC [1]). Tonight I had a look at variadic functions, the thing is though, that I'm on x86-64, and the va_arg instruction is not working. I've posted a bug report: http://llvm.org/bugs/show_bug.cgi?id=1740 In there I posted the .ll test case: define i32 @test(i32 %X, ...) { %ap = alloca i8*, i32 1024 %ap2 =
2009 Aug 28
1
[LLVMdev] va_arg
I would like to be able to instrument va_arg, but when I generate a bc file for a test case using: llvm-gcc -O3 -emit-llvm vararg.c -c -o vararg.bc I do not see va_arg. Instead, it seems the args are accessed through %struct.__va_list_tag, which makes things a bit trickier to instrument. Is there a way to force llvm-gcc to use va_arg? Perhaps there is some documentation about va_list_tag or
2009 Nov 27
0
[LLVMdev] Emit va_arg intrinsic in llvm-gcc?
Dear all, Is there a way to have llvm-gcc output the llvm va_arg intrinsic? As far as I understand, llvm-gcc directly lowers va_arg in the frontend using the TARGET_GIMPLIFY_VA_ARG target hook. I am aware that va_arg segfaults on x86-64 (http://llvm.org/bugs/show_bug.cgi?id=1740) and that llvm-gcc avoids this issue by always lowering calls to va_arg
2011 Aug 18
1
[LLVMdev] Is va_arg deprecated?
Oh, sorry about that, and thanks for the clarification as to what you were looking for. Here you go: ** Why do we want this option? ** Presently clang will manually lower va_arg() in the frontend to the equivalent (relatively complicated!) IR, as opposed to making use of the LLVM va_arg instruction directly. IR that contains the va_arg instruction is much easier to analyze because it is
2013 Dec 19
2
[LLVMdev] Problems with optimizations and va_arg intrinsic
Hi all, I am currently writing an obfuscation pass (on LLVM 3.3 code base) that works at IR level and that implement procedures fusion. For this, I am heavily relying on the va_arg intrinsic. My code is functional when compiled with no optimization (-O0), but I experience strange behavior when compiling with -O2 or -O3. I am currently using the libgmp and OpenSSL libraries test suites. I know
2017 Aug 14
2
[RFC] The future of the va_arg instruction
On 9 August 2017 at 19:38, Friedman, Eli <efriedma at codeaurora.org> wrote: > On 8/9/2017 9:11 AM, Alex Bradbury via llvm-dev wrote: >> >> Option 3: Teach va_arg to handle aggregates >> * In this option, va_arg might reasonably be expected to handle a >> struct, >> but would not be expected to have detailed ABI-specific knowledge. e.g. >> it
2010 Jul 19
0
[LLVMdev] Is va_arg deprecated?
Neal, FYI, my group has added a flag to llvm-gcc for emitting the va_arg instruction (instead of lowering in the front-end), and we also have an implementation of the VAARG instruction for X86-64. (which is currently not implemented in the LLVM backend). Both of these things will be sent upstream to LLVM soon, pending some more testing and review. If you are dire need of these features now, I
2011 Feb 19
0
[LLVMdev] Is va_arg deprecated?
On 19 February 2011 02:42, Sergey Yakoushkin <sergey.yakoushkin at gmail.com> wrote: > I'm working on source to source transformations and instrumentation. > A flag to disable 'va_arg' lowering in LLVM FEs will be very useful. Hi, For the sake of simplicity, if types are simple, we emit va_arg directly, otherwise we do like Clang and lower it in the front-end. Would be
2017 Aug 09
4
[RFC] The future of the va_arg instruction
# The future of the va_arg instruction ## Summary LLVM IR currently defines a va_arg instruction, which can be used to access a vararg. Few Clang targets make use of it, and it has a number of limitations. This RFC hopes to promote discussion on its future - how 'smart' should va_arg be? Should we be aiming to transition all targets and LLVM frontends to using it? ## Background on va_arg
2013 Feb 28
0
[LLVMdev] Mips backend 3.2 va_arg possible bug
Could you file a bug? On Wed, Feb 27, 2013 at 2:47 AM, Stavropoulos Nikos < n.stavropoulos at think-silicon.com> wrote: > i have this code > > typedef long long L; > typedef integer I; > void test2(auto L p0, auto L p1, auto L p2, auto L p4, ...) > { > va_list select; > > va_start (select, p4); > > report( va_arg(select,L) ); > report(
2011 Aug 17
0
[LLVMdev] Is va_arg deprecated?
I should have been more specific: "Why do we want this as an option? Do we want it on all the time? Why or why not?" -eric On Aug 17, 2011, at 3:02 PM, Will Dietz wrote: > To get clang to emit va_arg instructions for va_arg() calls, as > opposed to manually lowering it in the frontend, same as the llvm-gcc > patch sent earlier does. > > ~Will > > On Wed, Aug
2009 Jan 04
2
[LLVMdev] hi, llvm-gcc deal with va_arg() by word alignment.
hi,      I am porting llvm to our embedded cpu. By my abi, long long type is aligned by 8 bytes. But now llvm-gcc frontend follows x86 abi, generate word-alignment LLVM-IR for va_arg().    In some degree, llvm-gcc frontend depends on targets. The best solution is llvm-gcc can create va_arg node, I can lower it at the backend.    Who can give a temporary solution to make frontend can create 8
2011 Feb 19
2
[LLVMdev] Is va_arg deprecated?
Hi David, I'm working on source to source transformations and instrumentation. A flag to disable 'va_arg' lowering in LLVM FEs will be very useful. Have you sent your modifications upstream to LLVM? If not, could you please share link to your public repository. Thanks, Sergey Yakoushkin On Mon, Jul 19, 2010 at 11:18 PM, David Meyer <pdox at google.com> wrote: > Neal, >
2013 Feb 27
2
[LLVMdev] Mips backend 3.2 va_arg possible bug
i have this code typedef long long L; typedef integer I; void test2(auto L p0, auto L p1, auto L p2, auto L p4, ...) { va_list select; va_start (select, p4); report( va_arg(select,L) ); report( va_arg(select,I) ); report( va_arg(select,L) );
2016 Jan 10
2
[cfe-dev] Is it a va_arg bug in clang?
Hi Richard, I tried latest 3.7.1 release, the clang has same build failure and don’t know __builtin_ms_va_list at all. I compared the llvm trunk with 3.7.1 and find the trunk has a VA commit from Davis which is not included in the 3.7.1 release. So, I guess I need to directly build the latest trunk instead of the 3.7.1 release. (why 3.7.1 release doesn’t include this patch?) commit
2012 Jul 31
1
[LLVMdev] Instrumenting all va_arg invocations
Hi, I'm looking for a way to add instrumentation that handles all function arguments, one by one. With variable argument lists, this can only be done at the place of va_arg() call. Unfortunately, Clang lowers va_arg into platform-specific code in the frontend, and I can't find a good, reliable way to figure it out in our LLVM pass. I've tried adding a special case of TBAA info to the
2011 Aug 17
2
[LLVMdev] Is va_arg deprecated?
To get clang to emit va_arg instructions for va_arg() calls, as opposed to manually lowering it in the frontend, same as the llvm-gcc patch sent earlier does. ~Will On Wed, Aug 17, 2011 at 2:41 PM, Eric Christopher <echristo at apple.com> wrote: > > On Aug 17, 2011, at 11:53 AM, Will Dietz wrote: > >> FWIW, attached is a similar patch that adds a -falways-use-llvm-vaarg