Displaying 12 results from an estimated 12 matches for "llvmint32typ".
Did you mean:
llvmint32type
2017 Jan 25
2
mcjit C interface problems
...m attempting to use MCJIT with the C interface with llvm-3.9.0, and
it doesn't seem to work. This code is derived from Paul Smith's example
code:
int main(int argc, char const* argv[]) {
LLVMModuleRef mod = LLVMModuleCreateWithName("my_module");
LLVMTypeRef param_types[] = {LLVMInt32Type(), LLVMInt32Type()};
LLVMTypeRef ret_type = LLVMFunctionType(LLVMInt32Type(), param_types, 2,
0);
LLVMValueRef sum = LLVMAddFunction(mod, "sum", ret_type);
LLVMBasicBlockRef entry = LLVMAppendBasicBlock(sum, "entry");
LLVMBuilderRef builder = LLVMCreateBuilder();
LL...
2009 Nov 05
2
[LLVMdev] Strange error for libLLVMCore.a
...ags` -c fac.c
$ g++ `llvm-config --libs --cflags --ldflags core analysis
executionengine jit interpreter native backend engine` fac.o -o fac
fac.o: In function `main':
c:\Work\llvm//fac.c:20: undefined reference to `LLVMModuleCreateWithName'
c:\Work\llvm//fac.c:21: undefined reference to `LLVMInt32Type'
c:\Work\llvm//fac.c:22: undefined reference to `LLVMInt32Type'
c:\Work\llvm//fac.c:22: undefined reference to `LLVMFunctionType'
c:\Work\llvm//fac.c:22: undefined reference to `LLVMAddFunction'
c:\Work\llvm//fac.c:23: undefined reference to `LLVMSetFunctionCallConv'
c:\Work\ll...
2010 Jan 11
4
[LLVMdev] Operations on constant array value?
...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
-------------- next par...
2010 Jan 11
2
[LLVMdev] Operations on constant array value?
...LVMAddGlobal(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...
2010 Jan 11
0
[LLVMdev] Operations on constant array value?
...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
2012 Sep 27
0
[LLVMdev] Possible bug or misunderstanding of feature LLVMConstIntOfString
...code from C program: \n",
moduleName);
LLVMModuleRef modCEx = LLVMModuleCreateWithNameInContext(moduleName,
context);
// "main" function type definition:
LLVMTypeRef ppInt8 = LLVMPointerType(LLVMPointerType(LLVMInt8Type(),
0), 0);
LLVMTypeRef vpMainFuncTypes[] = { LLVMInt32Type(), ppInt8 };
LLVMTypeRef rMainFuncType = LLVMFunctionType(LLVMInt32Type(),
vpMainFuncTypes, 2, 0);
LLVMValueRef vFnMain = LLVMAddFunction(modCEx, "main", rMainFuncType);
LLVMSetFunctionCallConv(vFnMain, LLVMCCallConv);
LLVMBasicBlockRef bEntry = LLVMAppendBasicBlock(vFnM...
2010 Jan 11
0
[LLVMdev] Operations on constant array value?
...LVMAddGlobal(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?
>
> N...
2010 Jan 11
0
[LLVMdev] Operations on constant array value?
...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 Wi...
2009 Nov 05
0
[LLVMdev] Strange error for libLLVMCore.a
you want to use the execution engine and JIT but do not put them in the
llvm-config line??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091106/d26a0a02/attachment.html>
2017 Jan 26
2
mcjit C interface problems
....de> wrote:
> Hi,
>
> On 2017-01-25 15:17:04 -0800, Toshiyasu Morita via llvm-dev wrote:
> > long long x = strtoll(argv[1], NULL, 10);
> > long long y = strtoll(argv[2], NULL, 10);
> >
> > LLVMGenericValueRef args[] =
> > {LLVMCreateGenericValueOfInt(LLVMInt32Type(), x, 0),
> >
> > LLVMCreateGenericValueOfInt(LLVMInt32Type(), y, 0)};
> >
> > printf("args[0]: %d\n", (int)LLVMGenericValueToInt(args[0], 0));
> > printf("args[1]: %d\n", (int)LLVMGenericValueToInt(args[1], 0));
> >
> > LLVMGener...
2010 Jan 11
2
[LLVMdev] Operations on constant array value?
...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 co...
2011 Jun 18
1
[LLVMdev] loop only executes once
...ore i32 %pA, i32* %B
store i32 %addab, i32* %A
%sub = sub i32 %PD, 1
store i32 %sub, i32* %D
br label %Else
ewhile: ; preds = %Else
%CR = load i32* %C
ret i32 %CR
}
Source of function
Procedure CreateFibFunction(M.i,Context.i)
intType = LLVMInt32Type()
//Function returns an int And takes an int As the only parameter.
FunctionReturnType = LLVMFunctionType(IntType, at IntType,1,0)
//Create the fib function definition And insert it into the module M.
Fib2 = LLVMAddFunction(M, "fib2",FunctionReturnType)
//Set the function call convent...