similar to: [LLVMdev] Getting started (Windows)

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Getting started (Windows)"

2009 May 30
0
[LLVMdev] Getting started (Windows)
Hi, > Copied it's output > ; ModuleID = '/tmp/webcompile/_3997_0.bc' > 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 = "i386-pc-linux-gnu" > @.str = internal constant [12 x i8] c"hello world\00" ; <[12 x i8]*> [#uses=1]
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 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
2011 Jul 25
0
[LLVMdev] function failing to run in Jit
Try using i64 indices with GEP > 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 = >
2013 Apr 25
1
[LLVMdev] Allocate memory for a class
Hi! When I allocate memory for a structure, in _Znwm (operator new) function I need to specify size. How can I determine this information dynamically? ; ModuleID = '/tmp/webcompile/_12211_0.bc' target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple =
2011 Jun 28
2
[LLVMdev] Box removal
In the creation of dynamic languages we often have to box values together. For instance, take the following expression: IntObj c = sqrt((a*a)+(b*b)); Here, most likely, a bytecode interpreter would execute this as "mul_ints", "add_ints", "sqrt", etc. Inside these primitive functions we would have to unwrap our IntObj types, add the values, allocate a new object and
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 =
2009 Jan 06
2
[LLVMdev] LLVM Optmizer
The following C code : #include <stdio.h> #include <stdlib.h> int TESTE2( int parami , int paraml ,double paramd ) { int varx=0,vary; int nI =0; //varx= parami; if( parami > 0 ) { varx = parami; vary = varx + 1; } else { varx = vary + 1; vary = paraml; } varx = varx + parami + paraml; for( nI = 1 ; nI <= paraml; nI++) { varx =
2011 Feb 04
3
[LLVMdev] Data layout of structs
Dear all, I'm currently working on the automated program analysis tool AProVE (http://aprove.informatik.rwth-aachen.de/) and would like to use LLVM for analysis of C programs. I have the following example C program dealing with simple lists of integers: ------------ start C example ------------- #include<stdlib.h> struct list_el { int val; struct list_el * next; }; typedef
2012 Feb 25
3
[LLVMdev] Missed optimization on array initialization
Prompted by a SO post (http://stackoverflow.com/questions/9441882/compiler-instruction-reordering-optimizations-in-c-and-what-inhibits-them/9442363) I checked and found that LLVM yields the same (seemingly) suboptimal code as MSVC. Consider the following, simplified, C snippet: extern void bar(int*); void foo(int a) { int ar[100] = {a}; if (a) return; bar(ar); }
2010 Oct 24
2
[LLVMdev] lli : external functions and target datalayout
Hi All, I have a C code: ////////////////////////////// #include "stdio.h" int main () { putchar('a'); return 0; } llvm-gcc -emit-llvm, I got //////////////////////////////////////// ; ModuleID = 't1.bc' 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
2010 Jan 28
3
[LLVMdev] llvm interpreter cannot execute llvm-gcc generated bitcode
Hi! We are compiling a very large C project in llvm and trying to execute it in interpreter. There is a problem with executing the generated bitcode. We are using lli.exe and llvm-gcc.exe from official 2.6 LLVM release. We have localized the problem to following c code: -------------------- int f(unsigned char x) __attribute__((noinline)); int f(unsigned char x) { return x - 1; } int main()
2012 Feb 06
2
[LLVMdev] misc questions on opt and bitcode
Hi Eric, Here's the C code (example.c): include <stdio.h> int main() { printf("testing\n"); } Here's the LLVM IR (from llvm-gcc): ModuleID = 'example.c' target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple =
2009 May 30
3
[LLVMdev] Getting started (Windows)
Hi Duncan, Thanks for the reply, that did indeed work. I realise that I could use llvm-gcc but I want to learn how to use the parts of llvm that would allow me to make my own compiler (eventually), also at this point I'm trying to avoid having to build all of llvm myself and just use what is available pre-built from the site. I was wondering how to actually create the exe? For example with
2012 Feb 06
0
[LLVMdev] misc questions on opt and bitcode
On Feb 5, 2012, at 11:32 AM, Arpan Sen wrote: > For the very simple example below, I get Unknown instruction error from lli and llvm-dis, while llc does not print anything. Not sure what is that I am missing here. My llvm-gcc version is i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) > 1-39-155-188:pastebin Babai$ llvm-gcc example.c
2009 Nov 16
2
[LLVMdev] lli -force-interpreter complains about external function
Hi: When I try to execute lli -force-interpreter=true hello.bc, it gave the following error: LLVM ERROR: Tried to execute an unknown external function: i32 (i8*)* puts I think the error is because C library is not being linked with the byte code, but I was not able to find any helpful instruction in lli's document. Can you please teach me how to do it? Thanks Xu The hello.bc is
2010 Oct 24
0
[LLVMdev] lli : external functions and target datalayout
Jianzhou Zhao <jianzhou at seas.upenn.edu> writes: [snip] > The other question is about > 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" > > If I use this string to creat a TargetData object directly, I got an > assertion error: > >
2012 Jan 23
2
[LLVMdev] Possible bug in the dragonegg
Hi Duncan, >> #include<stdio.h> >> #include<string.h> >> >> int main(int argc, char** argv){ >> >> char a[8] = "aaaaaaa"; >> char b[8] = "bbbbbbb"; >> >> char *c = (char*) malloc(sizeof(char)*(strlen(a)+strlen(b)+1)); >> memcpy(c, a, strlen(a)); >> memcpy(c + strlen(a), b, strlen(b) + 1); >>
2010 Jan 28
0
[LLVMdev] llvm interpreter cannot execute llvm-gcc generated bitcode
Kristaps Straupe wrote: > Hi! > > We are compiling a very large C project in llvm and trying to execute > it in interpreter. There is a problem with executing the generated > bitcode. The interpreter is under-maintained in general, but this bug in particular is fixed SVN as-of r86428. Are you on a platform that isn't supported by llvm's jit? Nick > We are using
2012 Jan 24
0
[LLVMdev] Possible bug in the dragonegg
Hi Pablo, I can reproduce this with the supplied IR. It is related to the use of __memcpy_chk. As far as I can see it is a bug in lli or the LLVM code generators. Can you please open a bugreport, attaching the LLVM IR. Ciao, Duncan. On 23/01/12 17:00, Pablo Barrio wrote: > Hi Duncan, >>> #include<stdio.h> >>> #include<string.h> >>> >>> int