search for: add1f

Displaying 13 results from an estimated 13 matches for "add1f".

Did you mean: add1
2004 Aug 10
0
[LLVMdev] API on JIT, code snippets
...les are left as .o) Well. Compiled. Tested. Infinite loop in: GenericValue gv = EE->runFunction(FooF, noargs); you were really, really close, Reid, just a one mistake: < CallInst * Add1CallRes = new CallInst(FooF, Params, "foo", BB); > CallInst * Add1CallRes = new CallInst(Add1F, Params, "add1", BB); :-P > There is only one remaining item that I don't know how to do. After > ExecutionEngine::runFunction, you want to extract the result int value > from the function. The runFunction method returns a GenericValue but I > don't see an obvious...
2004 Aug 10
1
[LLVMdev] API on JIT, code snippets
...ted. Infinite loop in: > > GenericValue gv = EE->runFunction(FooF, noargs); > > you were really, really close, Reid, just a one mistake: > > < CallInst * Add1CallRes = new CallInst(FooF, Params, "foo", BB); > > > CallInst * Add1CallRes = new CallInst(Add1F, Params, "add1", BB); > > :-P > >> There is only one remaining item that I don't know how to do. After >> ExecutionEngine::runFunction, you want to extract the result int value >> from the function. The runFunction method returns a GenericValue but I &g...
2004 Aug 09
5
[LLVMdev] API on JIT, code snippets
...;llvm/ExecutionEngine/GenericValue.h" > > > using namespace llvm; > > int main() { > > // Create some module to put our function into it. > Module *M = new Module("test"); > > > // We are about to create the add1 function: > Function *Add1F; > > { > // first create type for the single argument of add1 function: > // the type is 'int ()' > std::vector<const Type*> ArgT(1); > ArgT[0] = Type::IntTy; > > // now create full type of the add1 function: > FunctionType *Add1...
2017 Apr 08
3
How to insert vector type input parameter for function in C/C++ API?
...e::getInt32Ty( >> Context),4), >> >> >> >> THIS IS MY CODE: >> LLVMContext Context; >> >> std::unique_ptr<Module> Owner = make_unique<Module>("test", Context); >> Module *M = Owner.get(); >> >> Function *Add1F = >> cast<Function>(M->getOrInsertFunction("add1", >> VectorType::(Type::getInt32Ty( >> Context),4), >> VectorType::(Type::getInt32Ty( >> Context),4), >> &g...
2005 Jan 11
2
[LLVMdev] Loop IR insertion
Hi, I am trying to insert a Loop IR into the existed bytecode file. insertion part by C code, char *p[n]; // pointer array for storing the address of strings int i; for(i=0;i<n;i++){ (p[i])[2] = (p[i])[2] ^ 0x27; } My questions are 1. for local variable 'char *p[n]' , it is represented by IR as alloca ...., so could I insert local variable (pointer array) directly as same way
2004 Aug 09
1
[LLVMdev] API on JIT, code snippets
...;llvm/ExecutionEngine/GenericValue.h" > > > using namespace llvm; > > int main() { > > // Create some module to put our function into it. > Module *M = new Module("test"); > > > // We are about to create the add1 function: > Function *Add1F; > > { > // first create type for the single argument of add1 function: > // the type is 'int ()' > std::vector<const Type*> ArgT(1); > ArgT[0] = Type::IntTy; > > // now create full type of the add1 function: > FunctionType *Add1...
2004 Aug 09
0
[LLVMdev] API on JIT, code snippets
...gt; > > > using namespace llvm; > > > > int main() { > > > > // Create some module to put our function into it. > > Module *M = new Module("test"); > > > > > > // We are about to create the add1 function: > > Function *Add1F; > > > > { > > // first create type for the single argument of add1 function: > > // the type is 'int ()' > > std::vector<const Type*> ArgT(1); > > ArgT[0] = Type::IntTy; > > > > // now create full type of the add1...
2004 Aug 09
0
[LLVMdev] API on JIT, code snippets
Reid wrote: > I have to agree with Misha on this. None of us knows "everything" about > LLVM and as you can see, Misha responded three hours before I did :). > Asking questions here is encouraged, so please feel free to post them on > LLVMdev. We'll always help where we can. well, OK :) Please find the attachment with the first approach to such an example i've
2004 Aug 09
3
[LLVMdev] API on JIT, code snippets
Valery, I have to agree with Misha on this. None of us knows "everything" about LLVM and as you can see, Misha responded three hours before I did :). Asking questions here is encouraged, so please feel free to post them on LLVMdev. We'll always help where we can. Thanks, Reid. On Mon, 2004-08-09 at 06:37, Misha Brukman wrote: > On Mon, Aug 09, 2004 at 12:32:33PM +0400, Valery
2009 Mar 20
2
[LLVMdev] Possible memory leakage in the LLVM JIT Engine
...if we do the following modification: for (;;) { gv = EE->runFunction(FooF, noargs); // Import result of execution: outs() << "Result: " << gv.IntVal << "\n"; EE->freeMachineCodeForFunction(FooF); EE->freeMachineCodeForFunction(Add1F); } It works but a memory usage of the application increases continuously. So my question is how can I clean up ALL of the memmory created by the JIT engine? Any pointers to a similar application that succesfully acopmlishes what I want, i.e. does lots of JITing without memory leakage, will be...
2017 Apr 08
2
How to insert vector type input parameter for function in C/C++ API?
...lation. HowToUseJIT_SIMD_FuncProto.cpp:94:55: error: expected unqualified-id VectorType::(Type::getInt32Ty(Context),4), THIS IS MY CODE: LLVMContext Context; std::unique_ptr<Module> Owner = make_unique<Module>("test", Context); Module *M = Owner.get(); Function *Add1F = cast<Function>(M->getOrInsertFunction("add1", VectorType::(Type::getInt32Ty(Context),4), VectorType::(Type::getInt32Ty(Context),4), //Type::getInt32Ty(Context), //This is working fine //Type::getInt32Ty(Context), //This is working fine...
2009 Mar 22
0
[LLVMdev] Possible memory leakage in the LLVM JIT Engine
...gt; > for (;;) > { > gv = EE->runFunction(FooF, noargs); > // Import result of execution: > outs() << "Result: " << gv.IntVal << "\n"; > EE->freeMachineCodeForFunction(FooF); > EE->freeMachineCodeForFunction(Add1F); > } > > It works but a memory usage of the application increases continuously. > > So my question is how can I clean up ALL of the memmory created by > the JIT engine? > > Any pointers to a similar application that succesfully acopmlishes > what I want, i.e. does...
2017 Apr 08
2
How to insert vector type input parameter for function in C/C++ API?
I am working on AVX2 code generation by LLVM framework. I want to generate LLVM-IR code for the following code by C/C++ API from LLVM framework. I am using LLVM3.8. Basically, I want to generate TARGET (Refer to below) LLVM-IR code for SOURCE function by C/C++ API. As you see below, the AVX2 data type is __m256i which is vector type. How can I indicate vector type (function return type, input