search for: moduleid

Displaying 20 results from an estimated 808 matches for "moduleid".

2017 Jun 22
2
Legal names for Functions and other Identifiers
.../GPGPU/kernel-params-only-some-arrays.ll <https://github.com/llvm-mirror/polly/blob/6b8cb877c2fa3ee0e626cac5811115a9c5c71b5b/test/GPGPU/kernel-params-only-some-arrays.ll#L19-L20> +++ b/test/GPGPU/kernel-params-only-some-arrays.ll @@ -16,12 +16,12 @@ ; B[i] += 42; ; } -; KERNEL: ; ModuleID = 'kernel_0' -; KERNEL-NEXT: source_filename = "kernel_0" +; KERNEL: ; ModuleID = 'kernel_params_only_some_arrays_%or.cond---%or.end9_kernel_0' +; KERNEL-NEXT: source_filename = "kernel_params_only_some_arrays_%or.cond---%or.end9_kernel_0" I don't understand...
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 = "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 = "x86_64-pc-linux-gnu" define i32 @test() nounwind readnone { %var1 = xor i32...
2015 Feb 18
3
[LLVMdev] Calling into non-linked function via a pointer
This is my module's dump, which is different than yours. I wonder how I can get the external thing for my function. define double @sum(double, double) { entry: call void @FooBar() %tmp = fadd double %0, %1 ret double %tmp } ; ModuleID = 'My_Module' define double @sum(double, double) { entry: call void @FooBar() %tmp = fadd double %0, %1 ret double %tmp } declare void @FooBar() On Tue, Feb 17, 2015 at 9:07 PM, Bruce Hoult <bruce at hoult.org> wrote: > Naturally you can, since C can. As usual, it's...
2011 Oct 18
2
[LLVMdev] LLVM constant propagation optimization question
Hi all, I'm writting following LLVM assembly: ; ModuleID = 'structaccess.ll' %struct._anon0 = type <{ i32, i32, i32 }> @s = common global %struct._anon0 zeroinitializer define arm_aapcscc void @foo() nounwind { L.entry: store i32 5, i32* getelementptr inbounds (%struct._anon0* @s, i32 0, i32 0) store i32 10, i32* getelementptr inboun...
2011 Oct 18
3
[LLVMdev] LLVM constant propagation optimization question
Hi Duncan, What do you mean by "a data layout string in your module" ? Best Regards Seb 2011/10/18 Duncan Sands <baldrick at free.fr> > Hi Seb, > > > I'm writting following LLVM assembly: > > > > ; ModuleID = 'structaccess.ll' > > > > not having a data layout string in your module disables many optimizations. > > Ciao, Duncan. > > > %struct._anon0 = type <{ i32, i32, i32 }> > > > > @s = common global %struct._anon0 zeroinitializer > > > &gt...
2011 Oct 18
0
[LLVMdev] LLVM constant propagation optimization question
Hi Seb, > I'm writting following LLVM assembly: > > ; ModuleID = 'structaccess.ll' > not having a data layout string in your module disables many optimizations. Ciao, Duncan. > %struct._anon0 = type <{ i32, i32, i32 }> > > @s = common global %struct._anon0 zeroinitializer > > define arm_aapcscc void @foo() nounwind { > L.e...
2012 Mar 12
3
[LLVMdev] scalarrepl fails to promote array of vector
Hi Chris, Thanks for your reply. You said that scalarRepl gets shy about loads and stores of the entire aggregate. Then I use a test case: ; ModuleID = 'test1.ll' define i32 @fun(i32* nocapture %X, i32 %i) nounwind uwtable readonly { %stackArray = alloca <4 x i32> %XC = bitcast i32* %X to <4 x i32>* %arrayVal = load <4 x i32>* %XC store <4 x i32> %arrayVal, <4 x i32>* %stackArray %arrayVal1 = load...
2013 Jun 27
2
[LLVMdev] Problem with linking modules which use a shared type
...gt;arg_begin() ); b = BasicBlock::Create( context, "b", h ); CallInst::Create( fDecl, args, "", b ); ReturnInst::Create( context, b ); verifyModule(*m2); Each module for itself is okay and passes the verification, leading to the following IR code: ; ModuleID = 'm1' %T = type { i32 } define void @f(%T) { b: ret void } ===================== ; ModuleID = 'm2' %T = type { i32 } declare void @f(%T) define void @h(%T) { b: call void @f(%T %0) ret void } Howeve...
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 = "i686-pc-linux-gnu" @MyArray = external global [1000 x i32] define i32 @foo(i32 %a, i32 %b) { Entry: %...
2012 Feb 02
3
[LLVMdev] Why extra 4 bytes on stack ???
...o 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 = "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-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32" target triple = "i386-pc-cygwin" define i32 @main() nounwind { %1 = alloca i32, align 4 %s = alloca i3...
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 = "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-n8:16:32" target triple = "i386-pc-linux-gnu" define void @t2(double* %x) { L.entry: %a = alloca [2 x i64], align 4...
2014 Nov 10
2
[LLVMdev] External names for LTO in gold plugin
Hi, In my work applying -flto to Chrome, I need to set some names to be skipped by the InternalizePass; otherwise, the linking stage fails (i.e., when building the chrome binary). In the past, I had a tiny patch that I hadn't submitted to LLVM: it was something like: Index: Internalize.cpp =================================================================== --- Internalize.cpp (revision
2012 Feb 02
0
[LLVMdev] Why extra 4 bytes on stack ???
...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 = > "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-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32" > target triple = "i386-pc-cygwin" > > define i32 @main() nounwind { >   %1 = alloca...
2011 Mar 05
2
[LLVMdev] how to use external function?
Hi there, It will be appreciated if you help me : I need to call an external function in LLVM bitcode but don't know how : ;ModuleID = 'm1' define i32 @main() { entry: %tmp0 = call i32 @MyOwnFunction() ret i32 0 } declare i32 @MyOwnFunction() I use below codes to run it $ llvm-as -f m1 -o m1.bc $ lli 1.bc (before it I have compiled MyOwnFunction module) when I run this program i receive this error : LLVM ERROR: Pr...
2019 May 24
2
Representations of IR in the output of opt
...ke two function pass managers, just in case. Now if I do the same thing but staying in text format, I get the same IR (up to module name): % opt -S -dse -verify -dce stress.ll -o stress-1.ll % opt -S -dse stress.ll | opt -S -dce -o stress-2.ll % diff -y --suppress-common-lines stress-{1,2}.ll ; ModuleID = 'stress.ll' | ; ModuleID = '<stdin>' Is there a specific behavior of opt that could explain this situation? What kind of difference could there be in the bytecode files that is lost in translation to text format ? Cheers, Sébastien Michelland
2012 Mar 12
0
[LLVMdev] scalarrepl fails to promote array of vector
Hi Fan, > You said that scalarRepl gets shy about loads and stores of the entire > aggregate. Then I use a test case: > > ; ModuleID = 'test1.ll' > define i32 @fun(i32* nocapture %X, i32 %i) nounwind uwtable readonly { > %stackArray = alloca <4 x i32> > %XC = bitcast i32* %X to <4 x i32>* > %arrayVal = load <4 x i32>* %XC > store <4 x i32> %arrayVal, <4 x i32>* %st...
2014 Sep 09
3
[LLVMdev] failed folding with constant array with opt -O3
I have the following simplified llvm ir, which basically returns value based on the first value of a constant array. ---- ; ModuleID = 'simple_ir3.txt' @f.b = constant [1 x i32] [i32 1], align 4 ; constant array with value 1 at the first element define void @f(i32* nocapture %l0) { entry: %fc_ = alloca [1 x i32] %f.b.v = load [1 x i32]* @f.b store [1 x i32] %f.b.v, [1 x i32]* %fc_ %0 = getelementptr [1...
2013 May 12
2
[LLVMdev] Problem with llvm-c
Hi, I have the following program (attached) I produces, using the llvm-c API, this: ; ModuleID = './llvm-test.bc' define i32 @test2() { EntryBlock: ret i32 3 } But, I want it to produce this: ; ModuleID = './llvm-test.bc' define i32 @test2() { EntryBlock: %1 = add i32 1, 2 ret i32 %1 } I.e. With the "add" in there. llvm appears to be doing some optimizatio...
2013 Mar 15
0
[LLVMdev] Simple question
...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 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 = "x86_64-pc-linux-gnu" > > define i32 @test() nounwind rea...
2013 Mar 15
0
[LLVMdev] Simple question
...utton <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 = > "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 = "x86_64-pc-linux-gnu" > > define i32 @test() nounwind read...