search for: llvmconstint

Displaying 12 results from an estimated 12 matches for "llvmconstint".

2010 Jan 11
4
[LLVMdev] Operations on constant array value?
...t array is to go through a global variable, for example: g = LLVMAddGlobal(module, LLVMTypeOf(v), "__string_" + string_literal_number); string_literal_number = string_literal_number + 1; v = LLVMConstString(string_literal, string_literal.Length, 0); LLVMSetInitializer(g, v); elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0), LLVMConstInt(LLVMInt32Type(), 0L, 0) }; return LLVMConstInBoundsGEP(g, elements, 2); Is it possible to get the address of an element of a constant array or struct without first initializing a global variable to the constant? Thanks in advance, -- James Williams ----------...
2010 Jan 11
2
[LLVMdev] Operations on constant array value?
...t; > g = LLVMAddGlobal(module, LLVMTypeOf(v), "__string_" + > > string_literal_number); > > string_literal_number = string_literal_number + 1; > > v = LLVMConstString(string_literal, string_literal.Length, 0); > > LLVMSetInitializer(g, v); > > elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0), > > LLVMConstInt(LLVMInt32Type(), 0L, 0) }; > > return LLVMConstInBoundsGEP(g, elements, 2); > > > > Is it possible to get the address of an element of a constant array or > > struct without first initializing a global variable to the constant?...
2010 Jan 11
0
[LLVMdev] Operations on constant array value?
...variable, for example: > > g = LLVMAddGlobal(module, LLVMTypeOf(v), "__string_" + > string_literal_number); > string_literal_number = string_literal_number + 1; > v = LLVMConstString(string_literal, string_literal.Length, 0); > LLVMSetInitializer(g, v); > elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0), > LLVMConstInt(LLVMInt32Type(), 0L, 0) }; > return LLVMConstInBoundsGEP(g, elements, 2); > > Is it possible to get the address of an element of a constant array or > struct without first initializing a global variable to the constant? No. -Eli
2010 Jan 11
0
[LLVMdev] Operations on constant array value?
...t; > g = LLVMAddGlobal(module, LLVMTypeOf(v), "__string_" + > > string_literal_number); > > string_literal_number = string_literal_number + 1; > > v = LLVMConstString(string_literal, string_literal.Length, 0); > > LLVMSetInitializer(g, v); > > elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0), > > LLVMConstInt(LLVMInt32Type(), 0L, 0) }; > > return LLVMConstInBoundsGEP(g, elements, 2); > > > > Is it possible to get the address of an element of a constant array or > > struct without first initializing a global variable to the constant?...
2010 Jan 11
0
[LLVMdev] Operations on constant array value?
...bal variable, for example: > > g = LLVMAddGlobal(module, LLVMTypeOf(v), "__string_" + string_literal_number); > string_literal_number = string_literal_number + 1; > v = LLVMConstString(string_literal, string_literal.Length, 0); > LLVMSetInitializer(g, v); > elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0), LLVMConstInt(LLVMInt32Type(), 0L, 0) }; > return LLVMConstInBoundsGEP(g, elements, 2); > > Is it possible to get the address of an element of a constant array or struct without first initializing a global variable to the constant? > > Thanks in advance, &gt...
2011 Jun 18
1
[LLVMdev] loop only executes once
...MPositionBuilderAtEnd(Builder, BB) //Protected a,b,c //a=1:b=1:c=0:d=argx A = LLVMBuildAlloca(Builder, IntType,"A")// B = LLVMBuildAlloca(Builder, IntType,"B")// C = LLVMBuildAlloca(Builder, IntType,"C")// D = LLVMBuildAlloca(Builder, IntType,"D")// One = LLVMConstInt(IntType, 1, 0) LLVMBuildStore(Builder,One,A)// LLVMBuildStore(Builder,One,B)// Zero = LLVMConstInt(IntType, 0, 0) LLVMBuildStore(Builder,Zero,C) LLVMBuildStore(Builder,ArgX,D) //If argx <= 2 : Return 1 : Goto Else IFBB = LLVMAppendBasicBlockInContext(Context, Fib2, "IF") ElseBB =...
2009 Nov 05
2
[LLVMdev] Strange error for libLLVMCore.a
...rence to `LLVMAppendBasicBlock' c:\Work\llvm//fac.c:30: undefined reference to `LLVMCreateBuilder' c:\Work\llvm//fac.c:32: undefined reference to `LLVMPositionBuilderAtEnd' c:\Work\llvm//fac.c:33: undefined reference to `LLVMInt32Type' c:\Work\llvm//fac.c:33: undefined reference to `LLVMConstInt' c:\Work\llvm//fac.c:33: undefined reference to `LLVMBuildICmp' c:\Work\llvm//fac.c:34: undefined reference to `LLVMBuildCondBr' c:\Work\llvm//fac.c:36: undefined reference to `LLVMPositionBuilderAtEnd' c:\Work\llvm//fac.c:37: undefined reference to `LLVMInt32Type' c:\Work\llvm/...
2010 Sep 07
0
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
On Sep 7, 2010, at 8:03 AM, F van der Meeren wrote: > Hello, > > I have a question, what is wrong with the following code? > > declare void @llvm.memcpy.p0i64.p0i64.i8(i64*, i64*, i8, i32, i1) nounwind > > ... > > call void @llvm.memcpy.p0i64.p0i64.i8(i64* %19, i64* %21, i8 %17, i32 0, i1 false) > > ... > > > According to the compiler this is the
2010 Sep 07
2
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
...functionType); LLVMRemoveAttribute(LLVMGetParam(function, 0), LLVMNoCaptureAttribute); LLVMRemoveAttribute(LLVMGetParam(function, 1), LLVMNoCaptureAttribute); } And then invoked it with this: LLVMValueRef args[] = { sourcePtr, destinationPtr, lengthInteger, LLVMConstInt(LLVMInt32TypeInContext(context), 0, true), LLVMConstInt(LLVMInt1TypeInContext(context), (unsigned long long)false, true), }; LLVMBuildCall(builder, function, args, numberOfArguments, ""); Then you end up with the following prototype: declare void @llvm.memcpy.p0i64...
2010 Sep 07
4
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
Hello, I have a question, what is wrong with the following code? declare void @llvm.memcpy.p0i64.p0i64.i8(i64*, i64*, i8, i32, i1) nounwind ... call void @llvm.memcpy.p0i64.p0i64.i8(i64* %19, i64* %21, i8 %17, i32 0, i1 false) ... According to the compiler this is the error, but I seem to miss where exactly my fault is. Intrinsic prototype has incorrect number of arguments! void (i64*,
2010 Jan 11
2
[LLVMdev] Operations on constant array value?
...lobal(module, LLVMTypeOf(v), "__string_" + >> > string_literal_number); >> > string_literal_number = string_literal_number + 1; >> > v = LLVMConstString(string_literal, string_literal.Length, 0); >> > LLVMSetInitializer(g, v); >> > elements = { LLVMConstInt(LLVMInt32Type(), 0L, 0), >> > LLVMConstInt(LLVMInt32Type(), 0L, 0) }; >> > return LLVMConstInBoundsGEP(g, elements, 2); >> > >> > Is it possible to get the address of an element of a constant array or >> > struct without first initializing a global varia...
2012 Sep 27
0
[LLVMdev] Possible bug or misunderstanding of feature LLVMConstIntOfString
Hi All I am a novice LLVM user trying to use LLVMConstIntOfString using the c api to get a integer of arbitrary size from a hexadecimal string. Example code follows: LLVMContextRef context = LLVMContextCreate(); LLVMValueRef value = LLVMConstIntOfString(LLVMInt64TypeInContext(context), "0x0000000f0000ffff", 16); This is working properl...