search for: threadsafemodul

Displaying 10 results from an estimated 10 matches for "threadsafemodul".

Did you mean: threadsafemodule
2020 Oct 01
2
OrcV1 removal
Hi, On 2020-10-01 15:29:12 -0700, Lang Hames wrote: > 24bytes / object -- Looks like I managed module ownership correctly but > leaked the ThreadSafeModule container. This should be fixed in 5044196b412f. That helped a bit, but not yet fully. Looks like it might be still reachable memory, so leakcheck isn't that helpful. Oooh. I think I see. For various reasons the symbol names we generate are unique over time. But the interned strings aren'...
2020 Oct 01
2
OrcV1 removal
...inkingLayer up to the > ResourceTracker API in 7436b2ab2428. Could you let me know whether that > fixes the leak you were seeing? It did improve the situation significantly, thanks! There's still a smaller leak, unfortunately. The function comments for modules say that: /** * Create a ThreadSafeModule wrapper around the given LLVM module. This takes * ownership of the M argument which should not be disposed of or referenced * after this function returns. * * Ownership of the ThreadSafeModule is unique: If it is transferred to the JIT * (e.g. by LLVMOrcLLJITAddLLVMIRModule), in which case t...
2020 Oct 02
2
OrcV1 removal
...gt; -- Lang. > > On Thu, Oct 1, 2020 at 4:42 PM Andres Freund <andres at anarazel.de> wrote: > >> Hi, >> >> On 2020-10-01 15:29:12 -0700, Lang Hames wrote: >> > 24bytes / object -- Looks like I managed module ownership correctly but >> > leaked the ThreadSafeModule container. This should be fixed in >> 5044196b412f. >> >> That helped a bit, but not yet fully. Looks like it might be still >> reachable memory, so leakcheck isn't that helpful. >> >> Oooh. I think I see. For various reasons the symbol names we generate &gt...
2020 Oct 01
2
OrcV1 removal
Hi, On 2020-09-30 19:00:45 -0700, Lang Hames wrote: > Ok -- I'll make getting the new lookup API working a priority then. Cool. > > I see a memory leak with OrcV2 that I didn't see with V1. I'm not yet > > sure where exactly they're coming from. Possible that I'm just missing a > > step somewhere. Or something around the removable code support
2019 Sep 19
3
"corrupted size vs. prev_size" when calling ExecutionSession::lookup()
...*DL))); // ... large part to generate IR code . if (llvm::verifyModule(*AST::getModule(), &llvm::errs())) { return 0; } else { std::cout << "Verified success\n"; } // run the generated IR code llvm::cantFail(CompileLayer.add(ES.getMainJITDylib(), llvm::orc::ThreadSafeModule(std::move(AST::takeModule()), AST::takeContext()))); auto symbol = llvm::cantFail(ES.lookup({&ES.getMainJITDylib()}, Mangle("main"))); int (*entry)() = (decltype(entry)) symbol.getAddress(); std::cout << entry() << std::endl; and the "corrupted size vs. pr...
2020 May 23
4
Assertion triggered when running simple hello-world code on iOS device using ORC/LLLazyJIT
...le by using the logic borrowed from the lli tool. Once I have the Module instance I construct an instance of orc::LLLazyJIT (J), configure it (again closely following the logic in lli tool) to which I then add the module like this: // Add the main module. ExitOnErr(J->addLazyIRModule(orc::ThreadSafeModule(std::move(MainModule), TSCtx))); Finally the module is executed like this: // Run main. auto MainSym = ExitOnErr(J->lookup("main")); typedef int (*MainFnPtr)(int, char *[]); auto Result = orc::runAsMain( jitTargetAddressToFunction<MainFnPtr>(MainSym.getAd...
2020 Apr 16
4
ORC Assertion failure
...ll!llvm::orc::RTDyldObjectLinkingLayer::emit(llvm::orc::MaterializationResponsibility R, std::unique_ptr<llvm::MemoryBuffer,std::default_delete<llvm::MemoryBuffer>> O) Line 155 C++ libravi.dll!llvm::orc::IRCompileLayer::emit(llvm::orc::MaterializationResponsibility R, llvm::orc::ThreadSafeModule TSM) Line 41 C++ libravi.dll!llvm::orc::IRTransformLayer::emit(llvm::orc::MaterializationResponsibility R, llvm::orc::ThreadSafeModule TSM) Line 25 C++ libravi.dll!llvm::orc::BasicIRLayerMaterializationUnit::materialize(llvm::orc::MaterializationResponsibility R) Line 132 C++...
2020 Jun 06
4
Assertion triggered when running simple hello-world code on iOS device using ORC/LLLazyJIT
...(J), configure it (again closely following the logic in lli tool) >>>>> to which I then add the module like this: >>>>> >>>>> // Add the main module. >>>>> >>>>> >>>>> ExitOnErr(J->addLazyIRModule(orc::ThreadSafeModule(std::move(MainModule), >>>>> TSCtx))); >>>>> >>>>> >>>>> Finally the module is executed like this: >>>>> >>>>> // Run main. >>>>> >>>>> auto MainSym = ExitOnErr(J->loo...
2020 Jun 20
1
Assertion triggered when running simple hello-world code on iOS device using ORC/LLLazyJIT
...n lli > tool) > >>>>>>> to which I then add the module like this: > >>>>>>> > >>>>>>> // Add the main module. > >>>>>>> > >>>>>>> > ExitOnErr(J->addLazyIRModule(orc::ThreadSafeModule(std::move(MainModule), > TSCtx))); > >>>>>>> > >>>>>>> > >>>>>>> Finally the module is executed like this: > >>>>>>> > >>>>>>> // Run main. > >>>>>>&g...
2019 Aug 08
6
New ORC v2 LLJIT - global variables
...ExecutionEngine w/ OrcMCJitReplacement. We are having a hard time with global variables. We have found a way to create/emit new globals during jitting by using the old ExecutionEngine::getOrEmitGlobalVariable. Is there an easier way to do this with the new jit engine? We were hoping to create a new ThreadSafeModule, add a GlobalVariable, and then add the module to the JIT engine through addLazyIRModule(), but this doesn't seem to work. 2nd question; Is the lookup function supposed to work with global variables by name? Looking through the CompileOnDemandLayer it seems to change the names of globals to &...