search for: llvmcreatemcjitcompilerformodul

Displaying 7 results from an estimated 7 matches for "llvmcreatemcjitcompilerformodul".

2015 May 23
2
[LLVMdev] Shared libs build failing since yesterday
...ib/libLLVMCore.so.3.7.0svn lib/libLLVMMC.so.3.7.0svn lib/libLLVMObject.so.3.7.0svn lib/libLLVMRuntimeDyld.so.3.7.0svn lib/libLLVMSupport.so.3.7.0svn -Wl,-rpath,"\$ORIGIN/../lib" && : lib/ExecutionEngine/CMakeFiles/LLVMExecutionEngine.dir/ExecutionEngineBindings.cpp.o: In function `LLVMCreateMCJITCompilerForModule': /home/rengolin/devel/llvm/src/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp:188: undefined reference to `llvm::setFunctionAttributes(llvm::StringRef, llvm::StringRef, llvm::TargetOptions const&, llvm::Module&, bool)' collect2: error: ld returned 1 exit status This is my C...
2013 Sep 22
2
[LLVMdev] Bad permissions for mapped region
...til.c:296) I have source tree checked out at f46e5eadc307beaef6e8dd0602bb4c63ca41fd50. To create MCJIT i use provided llvm-c apis: LLVMInitializeMCJITCompilerOptions(&options, sizeof(options)); options.OptLevel = MODULE_OPT_LEVEL; /* 3 of 0 */ options.CodeModel = LLVMCodeModelJITDefault; if (LLVMCreateMCJITCompilerForModule(&qry->llvm.engine, qry->llvm.mod, &options, sizeof(options), &error) != 0) { fprintf(stderr, "%s\n", error); LLVMDisposeMessage(error); abort(); } LLVMRunStaticConstructors(qry->llvm.engine); Then I do the IR building and get the function pointer i need: iter->r...
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
...MCreateMemoryBufferWithContentsOfFile("test_load_lib.ll",&ll_f,&err); //read .ll prt(err); LLVMParseIRInContext(LLVMGetGlobalContext(),ll_f,&m,&err); // ll_f doesnt need freeing prt(err); LLVMDumpModule(m); LLVMLinkInMCJIT(); LLVMExecutionEngineRef ee = 0; LLVMCreateMCJITCompilerForModule(&ee,m,0,0,&err); prt(err); using tf_t = int (); tf_t *f = (tf_t*)LLVMGetPointerToGlobal(ee,LLVMGetNamedFunction(m,"test_func")); At first i got "LLVM ERROR: Incompatible object format! " But by reading some articles I append LLVMSetTarget(m,"i686-pc-mingw32&...
2013 Sep 22
0
[LLVMdev] Bad permissions for mapped region
...ked out at f46e5eadc307beaef6e8dd0602bb4c63ca41fd50. > To create MCJIT i use provided llvm-c apis: > > LLVMInitializeMCJITCompilerOptions(&options, sizeof(options)); > options.OptLevel = MODULE_OPT_LEVEL; /* 3 of 0 */ > options.CodeModel = LLVMCodeModelJITDefault; > > if (LLVMCreateMCJITCompilerForModule(&qry->llvm.engine, qry->llvm.mod, > &options, sizeof(options), &error) != 0) { > fprintf(stderr, "%s\n", error); > LLVMDisposeMessage(error); > abort(); > } > LLVMRunStaticConstructors(qry->llvm.engine); > > Then I do the IR building and get...
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
...ad .ll > > prt(err); > > LLVMParseIRInContext(LLVMGetGlobalContext(),ll_f,&m,&err); // ll_f > doesnt > > need freeing > > prt(err); > > LLVMDumpModule(m); > > > > LLVMLinkInMCJIT(); > > LLVMExecutionEngineRef ee = 0; > > LLVMCreateMCJITCompilerForModule(&ee,m,0,0,&err); > > prt(err); > > using tf_t = int (); > > tf_t *f = > > (tf_t*)LLVMGetPointerToGlobal(ee,LLVMGetNamedFunction(m,"test_func")); > > > > At first i got "LLVM ERROR: Incompatible object format! " > > But by...
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
...ntext(),ll_f,&m,&err); // ll_f > >> > doesnt > >> > need freeing > >> > prt(err); > >> > LLVMDumpModule(m); > >> > > >> > LLVMLinkInMCJIT(); > >> > LLVMExecutionEngineRef ee = 0; > >> > LLVMCreateMCJITCompilerForModule(&ee,m,0,0,&err); > >> > prt(err); > >> > using tf_t = int (); > >> > tf_t *f = > >> > (tf_t*)LLVMGetPointerToGlobal(ee,LLVMGetNamedFunction(m,"test_func")); > >> > > >> > At first i got "LLVM ERROR...
2017 Mar 09
2
LLVMGetBitcodeModuleInContext2 problem
Oops, missed initializing some stuff. Added: LLVMLinkInMCJIT(); LLVMInitializeNativeTarget(); LLVMInitializeNativeAsmPrinter(); LLVMInitializeNativeAsmParser(); Now it crashes in LLVMGetFunctionAddress(). Hmm. On Wed, Mar 8, 2017 at 5:14 PM, Toshiyasu Morita <toshi at tensyr.com> wrote: > Made it a bit further. Here's the current code: > >