search for: entryfn

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

2010 Aug 17
4
[LLVMdev] clang: call extern function using JIT
hi, im creating a music application(image below). At the moment im using tcc compiler but im moving across to clang because of the improved compiler warnings. Can anyone please explain and show code so I can use clang's JIT to call functions in my application? Thanks. http://old.nabble.com/file/p29449300/51709341.jpeg -- View this message in context:
2010 Aug 19
1
[LLVMdev] how to runFunction? passing in an int
I wish to run a function passing in an int value of 5 as a single parameter. can you please complete the code as all the examples I can find are old. llvm::Function *EntryFn = Mod->getFunction("createModule"); if (!EntryFn) { return 255; } else { EE->runFunction(EntryFn, ???????); } Thank you! -- View this message in context: http://old.nabble.com/how-to-runFunction--passing-in-an-int-tp29479138p29479138.html Sent from the LLVM - Dev mailing...
2010 Aug 18
0
[LLVMdev] clang: call extern function using JIT
...od->getFunction("yipee"); if (!YipeeFn) { llvm::errs() << "'yipee' function not found in module.\n"; return 255; } // end code I have added ------------------------------------------------------------------------------------------- -- llvm::Function *EntryFn = Mod->getFunction("main"); if (!EntryFn) { llvm::errs() << "'main' function not found in module.\n"; return 255; } // FIXME: Support passing arguments. std::vector<std::string> Args; Args.push_back(Mod->getModuleIdentifier()); return EE-&gt...
2010 Aug 18
1
[LLVMdev] clang: call extern function using JIT
...= Mod->getFunction("yipee"); if (!YipeeFn) { llvm::errs() << "'yipee' function not found in module.\n"; return 255; } // end code I have added --------------------------------------------------------------------------------------------- llvm::Function *EntryFn = Mod->getFunction("main"); if (!EntryFn) { llvm::errs() << "'main' function not found in module.\n"; return 255; } // FIXME: Support passing arguments. std::vector<std::string> Args; Args.push_back(Mod->getModuleIdentifier()); return EE-&gt...
2010 Aug 18
1
[LLVMdev] clang: call extern function using JIT
...= Mod->getFunction("yipee"); if (!YipeeFn) { llvm::errs() << "'yipee' function not found in module.\n"; return 255; } // end code I have added --------------------------------------------------------------------------------------------- llvm::Function *EntryFn = Mod->getFunction("main"); if (!EntryFn) { llvm::errs() << "'main' function not found in module.\n"; return 255; } // FIXME: Support passing arguments. std::vector<std::string> Args; Args.push_back(Mod->getModuleIdentifier()); return EE-&gt...
2010 Aug 17
0
[LLVMdev] clang: call extern function using JIT
On Aug 17, 2010, at 1:56 PM, gafferuk wrote: > > hi, im creating a music application(image below). > > At the moment im using tcc compiler but im moving across to clang because of > the improved compiler warnings. > Can anyone please explain and show code so I can use clang's JIT to call > functions in my application? You'll probably want to take a look at the
2012 Dec 10
2
[LLVMdev] how to get and modify a local variable's value through executionEngine?
hello guys, recently, i successfully get and modify global variable by execution engine. the functions i used are listed here: int m=1; EE->updateGlobalMapping(p->M->getGlobalVariable("x",true),&m); EE->recompileAndRelinkFunction(EntryFn); x is the global variable in the module. but how to modify the local variable in the module? -- View this message in context: http://llvm.1065342.n5.nabble.com/how-to-get-and-modify-a-local-variable-s-value-through-executionEngine-tp52446.html Sent from the LLVM - Dev mailing list archive at Na...
2013 Mar 20
0
[LLVMdev] Problems with parallelizing lli
...default: errs() << argv[0] << ": invalid optimization level.\n"; - return 1; + return (void *)1; case ' ': break; case '0': OLvl = CodeGenOpt::None; break; case '1': OLvl = CodeGenOpt::Less; break; @@ -297,7 +286,7 @@ Function *EntryFn = Mod->getFunction(EntryFunc); if (!EntryFn) { errs() << '\'' << EntryFunc << "\' function not found in module.\n"; - return -1; + return (void *)-1; } // If the program doesn't explicitly call exit, we will need the Exit @@ -...
2010 Aug 18
0
[LLVMdev] clang: call extern function using JIT
I tried what you said, now I get: LLVM ERROR: Program used external function 'yipee' which could not be resolved! Stack dump: 0. Running pass 'X86 Machine Code Emitter' on function '@main' did not even get as far as a breakpoint. Óscar Fuentes wrote: > > gafferuk <gafferuk at gmail.com> writes: > >> Im confused. The function i wish to call is
2010 Aug 18
2
[LLVMdev] clang: call extern function using JIT
gafferuk <gafferuk at gmail.com> writes: > Im confused. The function i wish to call is a return type of int. > Im calling it with int dd = yipee(1); > > What's wrong? Declare the function: int yipee(int); int main() { int dd = yipee(1); return 0; } If that still crashes, put a breakpoint on `yipee' and see if the execution gets there, if the argument is
2013 Oct 03
0
[LLVMdev] libclang JIT frontend
...iveTarget(); std::string Error; OwningPtr<llvm::ExecutionEngine> EE( llvm::ExecutionEngine::createJIT(Mod, &Error)); if (!EE) { llvm::errs() << "unable to make execution engine: " << Error << "\n"; return 255; } llvm::Function *EntryFn = Mod->getFunction("main"); if (!EntryFn) { llvm::errs() << "'main' function not found in module.\n"; return 255; } // FIXME: Support passing arguments. std::vector<std::string> Args; Args.push_back(Mod->getModuleIdentifier()); ret...
2012 Dec 10
0
[LLVMdev] how to get and modify a local variable's value through executionEngine?
...; writes: > hello guys, > recently, i successfully get and modify global variable by execution engine. > the functions i used are listed here: > int m=1; > EE->updateGlobalMapping(p->M->getGlobalVariable("x",true),&m); > EE->recompileAndRelinkFunction(EntryFn); > x is the global variable in the module. > but how to modify the local variable in the module? A local variable does not exists until the function that defines it is executed, so pretending to get and modify it as you do for the global makes no sense.