search for: mangleandintern

Displaying 13 results from an estimated 13 matches for "mangleandintern".

Did you mean: mangleandinterner
2019 Sep 12
2
Questions after completed Kaleidoscope Chapter 1
Hello there, I finished Chapter 1 of the Kaleidoscope tutorial for using the Orc JIT API. I played around with some things and ended with some questions. 1. What is the use of "MangleAndInterner"? I read it is used to mangle the name for the lookup search, but I seem to be not able to use it correctly. In my first attempt I used the mangled name of my function "?helloOrc@@YAHXZ" with the lookup method - that worked. Now I tried "int helloOrc()" and it failed/did...
2020 Apr 13
4
LLVM 10 ORC2 issue with symbol resolution
...n addresses */ ES->createJITDylib("<main>"); MainJD = ES->getJITDylibByName("<main>"); MainJD->addGenerator( cantFail(llvm::orc::DynamicLibrarySearchGenerator::GetForCurrentProcess( DL->getGlobalPrefix()))); auto &JD = *MainJD; llvm::orc::MangleAndInterner mangle(*ES, *this->DL); llvm::orc::SymbolMap Symbols; for (int i = 0; global_syms[i].name != nullptr; i++) { Symbols.insert({mangle(global_syms[i].name), llvm::JITEvaluatedSymbol(llvm::pointerToJITTargetAddress(global_syms[i].address), llvm::JITSymbolFlags(llvm::JITSymbolFlags::FlagNames::...
2019 May 10
2
ORC - which example code?
...using ORC which as I understand it will be the supported API going forward, I noticed that in the first chapter of the updated Kaleidoscope tutorial, there is sample code that starts like this: ExecutionSession ES; RTDyldObjectLinkingLayer ObjectLayer; IRCompileLayer CompileLayer; DataLayout DL; MangleAndInterner Mangle; ThreadSafeContext Ctx; But in https://llvm.org/devmtg/2016-11/Slides/Hames-ORC.pdf there is sample code that looks like this: ObjectLinkingLayer LinkLayer; SimpleCompiler Compiler(TargetMachine()); IRCompileLayer<…> CompileLayer(LinkLayer, Compiler); Related but significantly dif...
2019 Sep 12
2
Questions after completed Kaleidoscope Chapter 1
....llvm.org> wrote: > > > > Hello there, > > > > > > > > I finished Chapter 1 of the Kaleidoscope tutorial for using the Orc JIT > API. I played around with some things and ended with some questions. > > > > > > > > What is the use of “MangleAndInterner”? > > I read it is used to mangle the name for the lookup search, but I seem > to be not able to use it correctly. In my first attempt I used the mangled > name of my function “?helloOrc@@YAHXZ” with the lookup method – that > worked. > > > > Now I tried “int helloOrc()...
2020 Oct 01
2
OrcV1 removal
...ringMap.h:322) | | ->03.54% (97,812B) 0x831FD62: llvm::orc::SymbolStringPool::intern(llvm::StringRef) (SymbolStringPool.h:159) | | ->03.54% (97,812B) 0x8320AF5: llvm::orc::ExecutionSession::intern(llvm::StringRef) (Core.h:1225) | | ->03.53% (97,542B) 0x83EFBAE: llvm::orc::MangleAndInterner::operator()(llvm::StringRef) (Mangling.cpp:30) | | | ->03.53% (97,542B) 0x83B20B2: llvm::orc::IRMaterializationUnit::IRMaterializationUnit(llvm::orc::ExecutionSession&, llvm::orc::IRSymbolMapper::ManglingOptions const&, llvm::orc::ThreadSafeModule)::{lambda(llvm::Module&) |...
2019 Sep 19
3
"corrupted size vs. prev_size" when calling ExecutionSession::lookup()
...std::make_unique<llvm::SectionMemoryManager>(); }); auto JTMB = llvm::orc::JITTargetMachineBuilder::detectHost(); auto DL = JTMB->getDefaultDataLayoutForTarget(); llvm::orc::IRCompileLayer CompileLayer(ES, ObjectLayer, llvm::orc::ConcurrentIRCompiler(std::move(*JTMB))); llvm::orc::MangleAndInterner Mangle(ES, *DL); ES.getMainJITDylib().setGenerator( llvm::cantFail(llvm::orc::DynamicLibrarySearchGenerator::GetForCurrentProcess(*DL))); // ... large part to generate IR code . if (llvm::verifyModule(*AST::getModule(), &llvm::errs())) { return 0; } else { std::cout <<...
2020 Oct 05
2
LLJIT: __{math}_finite symbols not resolved ?
...'ll set up a VM and see > if I can reproduce this locally to get some more insight here. > > In the meantime one workaround would be to define absoluteSymbol entries > for these functions: > > auto Err = J->getMainJITDylib().define( > absoluteSymbols({ > { J->mangleAndIntern("__log_finite"), > pointerToJITTargetAddress(&__log_finite) }, > { J->mangleAndIntern("__exp2_finite"), > pointerToJITTargetAddress(&__exp2_finite) } > })); > > -- Lang. > > On Mon, Oct 5, 2020 at 12:31 PM Jean-Michaël Celerier < > j...
2020 Oct 05
2
LLJIT: __{math}_finite symbols not resolved ?
Hello, Right now I am just using a Generator to look for symbols in my process (which links dynamically against libc / libm). It seems to have no trouble finding every other libc / libm / libc++ / ... symbol so I assumed that it was not necessary to specifically link against libm where these __finite symbols reside: $ nm -D /usr/lib/libm.so.6 | grep finite 0000000000050540 T
2020 Apr 13
2
LLVM 10 ORC2 issue with symbol resolution
...t;"); >> MainJD = ES->getJITDylibByName("<main>"); >> MainJD->addGenerator( >> cantFail(llvm::orc::DynamicLibrarySearchGenerator::GetForCurrentProcess( >> DL->getGlobalPrefix()))); >> auto &JD = *MainJD; >> llvm::orc::MangleAndInterner mangle(*ES, *this->DL); >> llvm::orc::SymbolMap Symbols; >> for (int i = 0; global_syms[i].name != nullptr; i++) { >> Symbols.insert({mangle(global_syms[i].name), >> >> llvm::JITEvaluatedSymbol(llvm::pointerToJITTargetAddress(global_syms[i].address), >> &g...
2020 Oct 02
2
OrcV1 removal
...: >> llvm::orc::SymbolStringPool::intern(llvm::StringRef) >> (SymbolStringPool.h:159) >> | | ->03.54% (97,812B) 0x8320AF5: >> llvm::orc::ExecutionSession::intern(llvm::StringRef) (Core.h:1225) >> | | ->03.53% (97,542B) 0x83EFBAE: >> llvm::orc::MangleAndInterner::operator()(llvm::StringRef) (Mangling.cpp:30) >> | | | ->03.53% (97,542B) 0x83B20B2: >> llvm::orc::IRMaterializationUnit::IRMaterializationUnit(llvm::orc::ExecutionSession&, >> llvm::orc::IRSymbolMapper::ManglingOptions const&, >> llvm::orc::ThreadSafeM...
2020 Oct 01
2
OrcV1 removal
Hi, On 2020-09-30 21:31:33 -0700, Lang Hames wrote: > I've taken a first shot at hooking RTDyldObjectLinkingLayer 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: /** *
2019 Aug 14
3
ORC v2 question
Hi Lang, On Tue, 13 Aug 2019 at 23:26, Lang Hames <lhames at gmail.com> wrote: >> I also get this message: >> JIT session error: Symbols not found: { raise_error } > > > Ahh -- I see the problem. The DynamicLibrarySearchGenerator is using the getAddressOfSymbol method, which (under the hood) is basically issuing an appropriate dlsym lookup, and that does not find
2020 Apr 13
2
LLVM 10 ORC2 issue with symbol resolution
...e("<main>"); > > >> MainJD->addGenerator( > > >> > cantFail(llvm::orc::DynamicLibrarySearchGenerator::GetForCurrentProcess( > > >> DL->getGlobalPrefix()))); > > >> auto &JD = *MainJD; > > >> llvm::orc::MangleAndInterner mangle(*ES, *this->DL); > > >> llvm::orc::SymbolMap Symbols; > > >> for (int i = 0; global_syms[i].name != nullptr; i++) { > > >> Symbols.insert({mangle(global_syms[i].name), > > >> > > >> > llvm::JITEvaluatedSymbol(llvm::pointer...