search for: s_pexecengine

Displaying 3 results from an estimated 3 matches for "s_pexecengine".

2009 Mar 15
0
[LLVMdev] Strange LLVM Crash
...function object with external linkage and the specified function type llvm::Function* pFuncObj = llvm::Function::Create( pFuncType, llvm::Function::ExternalLinkage, name, s_pModule ); // Add a global mapping in the execution engine for the function pointer s_pExecEngine->addGlobalMapping(pFuncObj, pFuncPtr); Where pFuncPtr is a void pointer to the native C++ function. I register several of these native functions which are meant to be runtime support for the scripts I then JIT compile. After compiling each script, I run optimization passes. If the global DCE o...
2009 Mar 14
3
[LLVMdev] Strange LLVM Crash
Nyx wrote: > The linkage type is set to external, I have little code snippet I use to > register those native functions in the first post of this topic. The global > DCE pass deletes the unused native functions when run. I commented it out > for now... Can you make this happen by writing a custom .ll to demonstrate the problem? For example: $ cat gdce.ll define i32 @foo() {
2009 Mar 14
5
[LLVMdev] Strange LLVM Crash
...a function object with external linkage and the specified function type llvm::Function* pFuncObj = llvm::Function::Create( pFuncType, llvm::Function::ExternalLinkage, name, s_pModule ); // Add a global mapping in the execution engine for the function pointer s_pExecEngine->addGlobalMapping(pFuncObj, pFuncPtr); The crash does not occur the first time I JIT compile a function, but the second or third time I compile some other function, I will get a crash when trying to create a call instruction. If I try to call the getReturnType() method on the function object b...