search for: getglobalprefix

Displaying 6 results from an estimated 6 matches for "getglobalprefix".

2020 Apr 13
4
LLVM 10 ORC2 issue with symbol resolution
...oing: /* global syms is a array mapping names to function 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)...
2020 Apr 13
2
LLVM 10 ORC2 issue with symbol resolution
...ction 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::JITEvaluated...
2019 Jun 27
2
Questions about moving from MCJIT to Orc JIT
...bol), Example: compiler are materializers. So to add symbols to your own JIT you can define them in JITDylib. For example, Suppose you want to add "your host process (on which JIT runs) symbols to the JIT". You can do JD.setGenerator(DynamicLibrarySearchGenerator::GetForCurrentProcess(DL.getGlobalPrefix())) Under hood, ORC normally search for your host symbols in the defGenerator if it can't find symbols anywhere else. You can look at core.cpp at line 1163 to see how it works! I highly recommended you to watch "Updating ORC for Concurrency" dev meeting talks, it is explained in de...
2019 Nov 12
3
ORC API C Standard/System Libraries
Hi all, First of all, I want to say that I really appreciate all the work that's gone into LLVM, clang and the ORC API. I would be very unlikely to be doing my current project if they weren't available. I'm using the ORC API to JIT some C code (soon to be C++) on Windows. (I was on LLVM 8.0.0 but it didn't handle the 'allocator' attribute so I upgraded to LLVM 9.0.0.)
2020 Apr 13
2
LLVM 10 ORC2 issue with symbol resolution
...t;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_s...
2019 Jun 27
2
Questions about moving from MCJIT to Orc JIT
Hi Bjoern, CC'ing Lang hames For questions, 1. In short yes, you can replace the memory manager, default one provided is section memory manager. 2. If you mean by " address of already compiled code", yes you can do that. Like this JITDylib.define(absoluteSymbols, ( Your_own_symbol , JITTargetAddress(Address of function))), now ORC can resolve all the references to Your_own_symbol