Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] function failing to run in Jit"
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 =
>
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] 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()
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 =
2013 Apr 24
0
[LLVMdev] Another missed optimization opportunity?
Hi Scott,
On 24/04/13 19:40, Scott Pakin wrote:
> I was suprised to find that some bitcode I'm generating isn't getting
> optimized. Here, I'm doing the equivalent of "myarray[5]++" (on an
> "extern int *myarray"), repeated three times:
does your bitcode contain data layout information?
Ciao, Duncan.
>
> @myarray = external global i32*
>
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 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
2010 Jan 06
2
[LLVMdev] something wrong with .ll file?
I am trying to compile a little intrinsic function for my machine. Here is a dump from clang-cc with --emit-llvm option:
=====================
; ModuleID = 'foo.c'
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"
@main.i = internal global i32
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 =
2012 Feb 28
0
[LLVMdev] Is it an opt bug ?
Hi Seb, I think it is an opt bug. If you run opt at -O1 then you get:
define void @t2(double* nocapture %x) nounwind {
L.entry:
%a = alloca [2 x i64], align 8
%0 = getelementptr inbounds [2 x i64]* %a, i32 0, i32 0
store i64 3, i64* %0, align 8
%1 = getelementptr [2 x i64]* %a, i32 0, i32 1
store i64 5, i64* %1, align 8
%2 = bitcast [2 x i64]* %a to double*
%3 = load double*
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 =
2013 Feb 07
1
[LLVMdev] alloca scalarization with dynamic indexing into vectors
Hi all,
I have a question regarding dynamic indexing into a vector with GEP. I see
that in the ScalarReplAggregates pass in the LLVM 3.2 release the call
SROA::isSafeGEP() will now allow alloca scalarization in the case where a
GEP index into a vector isn’t a constant. My question is: what is the
expected behavior when the index is out of bounds of the vector? Is it
undefined? I have an
2012 Feb 28
1
[LLVMdev] Is it an opt bug ?
Hi Duncan,
Indeed, I made same experiment as you and concluded that it might be a BUG.
Shall I submit it to llvm bug tracking support ?
Do you think there could be a work-around ?
Thanks for your quick answer.
Best Regards
Seb
2012/2/28 Duncan Sands <baldrick at free.fr>
> Hi Seb, I think it is an opt bug. If you run opt at -O1 then you get:
>
> define void @t2(double*
2009 May 30
3
[LLVMdev] Getting started (Windows)
Hi,
I'm just trying to get started with a simple example with LLVM under
windows. I downloaded the mingw binaries from the website and would
like to compile a program. (PS: The mingw binaries did not come with
any documentation on what they are and how to use them)
I used the online code generator (http://llvm.org/demo/index.cgi) to
compile hello world:
#include <stdio.h>
int main() {
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
2013 Apr 24
8
[LLVMdev] Another missed optimization opportunity?
I was suprised to find that some bitcode I'm generating isn't getting
optimized. Here, I'm doing the equivalent of "myarray[5]++" (on an
"extern int *myarray"), repeated three times:
@myarray = external global i32*
define void @update_array() #0 {
%1 = load i32** @myarray, align 8
%2 = getelementptr inbounds i32* %1, i64 5
%3 = load
2010 Jan 06
0
[LLVMdev] something wrong with .ll file?
On Jan 6, 2010, at 1:12 PM, fima rabin wrote:
> I am trying to compile a little intrinsic function for my machine. Here is a dump from clang-cc with --emit-llvm option:
> =====================
>
> ; ModuleID = 'foo.c'
> 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"
>
2011 Dec 13
2
[LLVMdev] AMD IL Code Generator Backend for OpenCL
We are working on getting the documentation cleaned up to the point where it can be released.
If you look at the test cases, you can infer what needs to be done. Basically since this is targeted
for OpenCL, we annotate OpenCL kernels slightly different than normal functions and that is
what causes the code to be generated. That being said, on my list of things to do is fix this so that
any
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 Sep 09
3
[LLVMdev] runStaticConstructorsDestructors not calling static destructors
Hi there,
I'm having trouble getting ExecutionEngine->runStaticConstructorsDestructors(module, true) to actually trigger static destructors in my code. The static constructors however do get called.
I don't know if this is an LLVM or Clang issue, from looking at the IR (see below) it looks like the destructor is being tied to cxa_atexit, and I wonder if that is not called by