search for: llvmlinkinmcjit

Displaying 19 results from an estimated 19 matches for "llvmlinkinmcjit".

2011 Aug 25
3
[LLVMdev] Trouble using the MCJIT: "Target does not support MC emission" error
...quot;Target does not support MC emission!" when I call EngineBuilder::create(). I assume that I'm just not doing something necessary for initialization, but I'm not sure what it would be--I am calling all of: llvm::InitializeNativeTarget(); llvm::InitializeAllTargetMCs(); LLVMLinkInMCJIT(); LLVMLinkInJIT(); and the module I'm trying to load does have a reasonable target: target triple = "x86_64-apple-darwin11.0.0" I've attached a short test case that has the sequence of calls that I'm making and one of the bitcode files I'm trying to use. I'd b...
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'...
2011 Aug 25
2
[LLVMdev] Trouble using the MCJIT: "Target does not support MC emission" error
...on!" when I call EngineBuilder::create().  I assume that I'm just not doing something necessary for initialization, but I'm not sure what it would be--I am calling all of: >> >>      llvm::InitializeNativeTarget(); >>      llvm::InitializeAllTargetMCs(); >>      LLVMLinkInMCJIT(); >>      LLVMLinkInJIT(); >> >> and the module I'm trying to load does have a reasonable target: >> >> target triple = "x86_64-apple-darwin11.0.0" >> >> I've attached a short test case that has the sequence of calls that I'm making a...
2018 May 11
0
About Error: Interpreter has not been linked in
Ok. I figured out. Following methods needs to be called. That fixed the issue. llvm::InitializeNativeTarget(); LLVMInitializeNativeAsmPrinter(); LLVMInitializeNativeAsmParser(); LLVMLinkInMCJIT(); Aaron On Thu, May 10, 2018 at 8:33 PM, Aaron <acraft at gmail.com> wrote: > Hello, > > When I try to create execution engine I do get "*Interpreter has not been > linked in.*" error and EngineBuilder returns NULL. > > Here is the line I use to create executi...
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
...MemoryBufferRef ll_f = 0; LLVMModuleRef m = 0; LLVMCreateMemoryBufferWithContentsOfFile("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...
2011 Aug 25
0
[LLVMdev] Trouble using the MCJIT: "Target does not support MC emission" error
...upport MC emission!" when I call EngineBuilder::create(). I assume that I'm just not doing something necessary for initialization, but I'm not sure what it would be--I am calling all of: > > llvm::InitializeNativeTarget(); > llvm::InitializeAllTargetMCs(); > LLVMLinkInMCJIT(); > LLVMLinkInJIT(); > > and the module I'm trying to load does have a reasonable target: > > target triple = "x86_64-apple-darwin11.0.0" > > I've attached a short test case that has the sequence of calls that I'm making and one of the bitcode files...
2011 Aug 26
2
[LLVMdev] Trouble using the MCJIT: "Target does not support MC emission" error
...er::create(). I assume that I'm just not doing something necessary for initialization, but I'm not sure what it would be--I am calling all of: >>>> >>>> llvm::InitializeNativeTarget(); >>>> llvm::InitializeAllTargetMCs(); >>>> LLVMLinkInMCJIT(); >>>> LLVMLinkInJIT(); >>>> >>>> and the module I'm trying to load does have a reasonable target: >>>> >>>> target triple = "x86_64-apple-darwin11.0.0" >>>> >>>> I've attached a short tes...
2018 May 11
1
About Error: Interpreter has not been linked in
...11 May 2018, at 05:21, Aaron via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Ok. I figured out. Following methods needs to be called. That fixed the issue. > > llvm::InitializeNativeTarget(); > LLVMInitializeNativeAsmPrinter(); > LLVMInitializeNativeAsmParser(); > LLVMLinkInMCJIT(); > > Aaron > > >> On Thu, May 10, 2018 at 8:33 PM, Aaron <acraft at gmail.com> wrote: >> Hello, >> >> When I try to create execution engine I do get "Interpreter has not been linked in." error and EngineBuilder returns NULL. >> >&g...
2016 Nov 16
2
MCJit and remove module memory leak?
...016 at 12:00 AM, koffie drinker via llvm-dev < llvm-dev at lists.llvm.org> wrote: > There's a orc mcjit drop in replacement in the source tree. > Am I correct to assume that Orc is used (and emulating mcjit behaviour) > when replacing > LLVMLinkInOrcMCJITReplacement(); > //LLVMLinkInMCJIT(); > and linking with libOrcJit ? > Does this replacement handle memory better than original mcjit ? > > > On Mon, Nov 7, 2016 at 8:39 PM, Kevin P. Neal via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> On Fri, Nov 04, 2016 at 04:20:32PM -0700, Lang Hames via...
2018 May 11
2
About Error: Interpreter has not been linked in
Hello, When I try to create execution engine I do get "*Interpreter has not been linked in.*" error and EngineBuilder returns NULL. Here is the line I use to create execution engine: auto executionEngine = llvm::EngineBuilder(std::move(m_module)).setErrorStr(&error).create(); Here are all headers I have included: #include "llvm/ADT/STLExtras.h" #include
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
...ntsOfFile("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")); > > >...
2011 Aug 31
0
[LLVMdev] Trouble using the MCJIT: "Target does not support MC emission" error
...LLVMPowerPCDesc.a(PPCMCTargetDesc.o): In function `PPCInstPrinter': llvm-svn/lib/Target/PowerPC/MCTargetDesc/../InstPrinter/PPCInstPrinter.h:28: undefined reference to `vtable for llvm::PPCInstPrinter' However, I noticed that lli does neither call InitializeAllTargetMCs(), nor does it call LLVMLinkInMCJIT() and LLVMLinkInJIT(). Adapting my code to lli yields the same problem as for lli (unknown object format). Any more ideas? Best, Ralf Matt Pharr wrote: > Following along from lli code, if you add a call to InitializeNativeTargetAsmPrinter() during setup, it gets a bit farther and crashes rath...
2011 Aug 26
0
[LLVMdev] Trouble using the MCJIT: "Target does not support MC emission" error
...ll EngineBuilder::create(). I assume that I'm just not doing something necessary for initialization, but I'm not sure what it would be--I am calling all of: >>> >>> llvm::InitializeNativeTarget(); >>> llvm::InitializeAllTargetMCs(); >>> LLVMLinkInMCJIT(); >>> LLVMLinkInJIT(); >>> >>> and the module I'm trying to load does have a reasonable target: >>> >>> target triple = "x86_64-apple-darwin11.0.0" >>> >>> I've attached a short test case that has the sequence o...
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
....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,LLVMGetNa...
2016 Oct 28
4
MCJit and remove module memory leak?
I'm on llvm 3.8.1 and was wondering if there's a memory leak in the removeModule impl of mcjit. In the tutorial http://llvm.org/releases/3.8.1/docs/tutorial/LangImpl4.html a module is removed from the Jit by invoking removeModule. According to the tutorial: "Its API is very simple:: addModule adds an LLVM IR module to the JIT, making its functions available for execution;
2013 Feb 08
1
[LLVMdev] JIT on armhf
> So I'm using "llvm/ExecutionEngine/MCJIT.h" instead of > "llvm/ExecutionEngine/JIT.h", and I've added setUseMCJIT(true) to > EngineBuilder, but what actually happens is: > > LLVM ERROR: Target does not support MC emission! > > Do I need to do anything else? IIRC, this error might be due to not linking against the MCJIT library component. Add the
2017 Jan 25
2
mcjit C interface problems
...LLVMValueRef tmp = LLVMBuildAdd(builder, LLVMGetParam(sum, 0), LLVMGetParam(sum, 1), "tmp"); LLVMBuildRet(builder, tmp); char* error = NULL; LLVMVerifyModule(mod, LLVMAbortProcessAction, &error); LLVMDisposeMessage(error); LLVMExecutionEngineRef engine; error = NULL; LLVMLinkInMCJIT(); LLVMInitializeNativeTarget(); LLVMInitializeNativeAsmPrinter(); LLVMInitializeNativeAsmParser(); if (LLVMCreateExecutionEngineForModule(&engine, mod, &error) != 0) { fprintf(stderr, "failed to create execution engine\n"); abort(); } if (error) { fprintf...
2017 Mar 08
2
LLVMGetBitcodeModuleInContext2 problem
Or do you mean I need to load the module into memory before calling LLVMGetBitcodeModuleInContext2? > Yes, you need to load the module into memory first. > LLVMCreateMemoryBufferWithContentsOfFile will do that for you. Thanks! On Wed, Mar 8, 2017 at 3:48 PM, Friedman, Eli <efriedma at codeaurora.org> wrote: > On 3/8/2017 3:44 PM, Toshiyasu Morita wrote: > > >>
2013 Nov 01
4
[LLVMdev] [Proposal] Adding callback mechanism to Execution Engines
...stration Interfaces /// @{ Index: lib/ExecutionEngine/MCJIT/MCJIT.cpp =================================================================== --- lib/ExecutionEngine/MCJIT/MCJIT.cpp (revision 193441) +++ lib/ExecutionEngine/MCJIT/MCJIT.cpp (working copy) @@ -39,6 +39,43 @@ extern "C" void LLVMLinkInMCJIT() { } +typedef std::map<std::string, void*(*)()> FunctionIndexMapTy; +static FunctionIndexMapTy FunctionIndexMap; + +static FunctionIndexMapTy& GetFunctionIndexMap() { + return FunctionIndexMap; +} + +typedef std::map<std::string, void*> ArgumentsIndexMapTy; +static ArgumentsI...