similar to: [LLVMdev] (no subject)

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] (no subject)"

2012 Feb 02
0
[LLVMdev] (no subject)
Hi Umesh, > Again ,I'm newbie to LLVM and please pardon me ..if you guys feel that ,the > below question is very basic :) > > Here i go ,compiled the below sample with clang i.e *clang enum.c -S -emit-llvm* > and there respective file are > > $ cat enum.c > int main() > { > enum type{one=1,two,three} s; > s = one; > return s; > } > > $ cat
2012 Feb 02
2
[LLVMdev] (no subject)
Hi Duncan, Appreciate you response here and yeah any optimization switch for clang will make this extra bytes go away ...Was very curious to know why these extra bytes for and can you please elaborate more on "for storing the return value in more complicated cases" ...That helps me understand the LLVM internals :) Thanks ~Umesh On Thu, Feb 2, 2012 at 2:19 PM, Duncan Sands
2012 Feb 02
3
[LLVMdev] Why extra 4 bytes on stack ???
Hi There , Again ,I'm newbie to LLVM and please pardon me ..if you guys feel that ,the below question is very basic :) Here i go ,compiled the below sample with clang i.e *clang enum.c -S -emit-llvm* and there respective file are $ cat enum.c int main() { enum type{one=1,two,three} s; s = one; return s; } $ cat enum.s ; ModuleID = 'enum.c' target datalayout =
2012 Feb 02
0
[LLVMdev] (no subject)
Hi Umesh, The compiler generates an alloca (stack space) for every local variable defined in a function. Along with local variables this also includes space to store the function parameters and also the variable that holds the return value. For example: Int x(int a, int b) { Return a + b; } Would compile to something like this: Define i32 @x(i32 %a, i32 %b) { %ret.addr = alloca i32
2012 Feb 02
0
[LLVMdev] Why extra 4 bytes on stack ???
On Thu, Feb 2, 2012 at 12:25 PM, Umesh Kalappa <umesh.kalappa0 at gmail.com> wrote: > Hi There , > > Again ,I'm newbie to LLVM  and please pardon me ..if you guys  feel that > ,the below question is very basic :) > > Here i go ,compiled the below sample with clang i.e clang enum.c -S > -emit-llvm and there respective file are > > $ cat enum.c > int main()
2011 Nov 25
5
[LLVMdev] Where does LLVM mangle characters from llvm-ir names while generating native code?
So I was taking a look at Microsoft C++ ABI support while on vacation, and ran into a major issue. Given the following llvm-ir: $ clang++ -S -emit-llvm -O3 mangling.cpp -o - -Xclang -cxx-abi -Xclang microsoft ; ModuleID = 'mangling.cpp' target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-
2011 Nov 25
2
[LLVMdev] Where does LLVM mangle characters from llvm-ir names while generating native code?
In the case I posted I had removed that line, however, you still get the __3F_ in the generated assembly with it. Sent from my iPhone On Nov 25, 2011, at 2:15 PM, Charles Davis <cdavis at mymail.mines.edu> wrote: > > On Nov 25, 2011, at 8:39 AM, Michael Spencer wrote: > >> So I was taking a look at Microsoft C++ ABI support while on vacation, >> and ran into a major
2011 Nov 25
0
[LLVMdev] Where does LLVM mangle characters from llvm-ir names while generating native code?
On Nov 25, 2011, at 8:39 AM, Michael Spencer wrote: > So I was taking a look at Microsoft C++ ABI support while on vacation, > and ran into a major issue. Given the following llvm-ir: > > $ clang++ -S -emit-llvm -O3 mangling.cpp -o - -Xclang -cxx-abi -Xclang microsoft > ; ModuleID = 'mangling.cpp' > target datalayout = >
2012 Jan 31
1
[LLVMdev] Pointer aliasing
Hi Dan and Others , I'm newbie to LLVM and Clang ,But has experience on compiler optimization and VM . Everyone talking about the LLVM in my organisation so thought of peeking into it and where this discussion is stalled me ... so i tried to simulate the problem ,which is discussed here . vi sample.c double f(double** p ) { double a,b,c; double * x = &a; double * y =
2011 Nov 25
0
[LLVMdev] Where does LLVM mangle characters from llvm-ir names while generating native code?
On Nov 25, 2011, at 2:22 PM, bigcheesegs at gmail.com wrote: > In the case I posted I had removed that line, however, you still get the __3F_ in the generated assembly with it. Huh. It only seems to happen with a Windows triple or a Linux triple. Doesn't happen with a Mac triple, though--probably because the Darwin assembler supports quoted symbols (i.e. you can enclose an identifier in
2013 Mar 15
6
[LLVMdev] Simple question
Hi, I think this is a very simple question, and it must just be missing something. I am looking for find out how to assign a constant integer value to the variable in llvm ir. The following returns 12, and %var2 = 12. ; ModuleID = 't.c' target datalayout =
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
Hi, I have a IR file generated by Clang: ; ModuleID = 'test_load_lib.c' target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32" target triple = "i686-pc-mingw32" declare i32 @a_outside_func(i32) define i32 @test_func() { entry: %call = call i32
2013 Feb 04
2
[LLVMdev] Problem with PTX assembly printing (NVPTX backend)
Hi, > Can you post the llc command line you're using? Can you post an LLVM IR > file that causes this behavior? yes: ${LLVM_PATH}/bin/llc -o helloworld.s -march=nvptx helloworld.ll where LLVM_PATH my local installation path for LLVM. Also attaching helloworld.c: #include <stdio.h> int main(void) { printf("Hello World!\n"); return 0; } and helloworld.ll:
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
Hello I quite thank you for your advice,but I have to tell that it made no difference too calling "LLVMAddGlobalMapping(ee,LLVMGetNamedFunction(m,"_a_outside_func"),(void*)(&a_outside_func));". 2014-04-04 16:10 GMT+08:00 Anton Korobeynikov <anton at korobeynikov.info>: > Hello > > While there is a symbol in the object file, there is nothing like this >
2012 Feb 28
4
[LLVMdev] Is it an opt bug ?
Hi all, I'm looking at following code snippet: void t2(double *x) { long long a[2]; a[0] = 3; a[1] = 5; *x = * ((double *) a); *(x+1) = * ((double *) &a[a[0]-2]); } I use generate LLVM code using my own front-end that looks like: ; ModuleID = 'jb.c' target datalayout =
2011 Jul 25
3
[LLVMdev] function failing to run in Jit
Is there any reason this generated code won't run in the Jit? I've pretty much got everything else working for my front end which all runs fin in the Jit but I can't get global arrays to work. ; ModuleID = 'test' target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" target triple
2012 Jan 26
0
[LLVMdev] Pointer aliasing
On Jan 24, 2012, at 8:58 PM, Brent Walker wrote: > Thank you for your reply. The compromise you describe below, is it a > compromise in the LLVM back end or in clang? I run into this while > building a compiler for a small DSL language for which I generate > functions that receive a context from which they extract a bunch of > pointers to doubles from which inputs are passed to
2013 Apr 15
1
[LLVMdev] Contradiction in DataLayout string
Hello, I have the following DataLayout string: e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32 Note that it has f80:128:128 followed by f80:32:32. This is an output from clang on Windows (clang -m32 -emit-llvm). Triple is i686-pc-win32. Documentation doesn't specify the interpretation of such
2013 Mar 15
0
[LLVMdev] Simple question
On Mar 15, 2013, at 3:08 PM, James Courtier-Dutton <james.dutton at gmail.com> wrote: > Hi, > > I think this is a very simple question, and it must just be missing something. > > I am looking for find out how to assign a constant integer value to > the variable in llvm ir. > > The following returns 12, and %var2 = 12. > ; ModuleID = 't.c' > target
2013 Mar 15
0
[LLVMdev] Simple question
James Courtier-Dutton <james.dutton at gmail.com> writes: > I think this is a very simple question, and it must just be missing something. > > I am looking for find out how to assign a constant integer value to > the variable in llvm ir. > > The following returns 12, and %var2 = 12. > ; ModuleID = 't.c' > target datalayout = >