search for: absolutesymbols

Displaying 15 results from an estimated 15 matches for "absolutesymbols".

2019 Aug 14
3
ORC v2 question
...unately that method's behavior is not a good fit for what DynamicLibrarySearchGenerator is trying to do. > > There are two ways you could tackle this: > (1) Write your own generator that calls sys::DynamicLibrary::SearchforAddressOfSymbol, or > (2) Add the symbols up-front using the absoluteSymbols function. > > I would be inclined to do the latter: it's more explicit, and easier to limit searches to exactly the symbols you want. > Okay I will look into this. Thank you for all the help. > > CodeGen optimization seems a more likely culprit: JITTargetMachineBuilder and Exec...
2020 Oct 05
2
LLJIT: __{math}_finite symbols not resolved ?
.... I usually develop on MacOS, but I'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 P...
2020 Apr 13
4
LLVM 10 ORC2 issue with symbol resolution
...ymbols; 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::Absolute))}); } llvm::cantFail(JD.define(llvm::orc::absoluteSymbols(Symbols)), "Failed to install extern symbols"); FYI - my previous post on similar issue. Basically I haven't been able to get ORC v2 working - tried in 8, 9 and now 10. http://llvm.1065342.n5.nabble.com/llvm-dev-ORC-v2-question-tp130489p130601.html Thanks and Regards Dibyendu
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
...{ >> Symbols.insert({mangle(global_syms[i].name), >> >> llvm::JITEvaluatedSymbol(llvm::pointerToJITTargetAddress(global_syms[i].address), >> >> llvm::JITSymbolFlags(llvm::JITSymbolFlags::FlagNames::Absolute))}); >> } >> llvm::cantFail(JD.define(llvm::orc::absoluteSymbols(Symbols)), "Failed >> to install extern symbols"); >> >> FYI - my previous post on similar issue. >> Basically I haven't been able to get ORC v2 working - tried in 8, 9 and now 10. >> >> http://llvm.1065342.n5.nabble.com/llvm-dev-ORC-v2-question-tp1...
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 to the provided the Address. 3. Yes, all the class/function with legacy prefix will be removed in subsequent releases. 4. Could please provide some more context on this? Like it...
2019 Sep 12
2
Questions after completed Kaleidoscope Chapter 1
...implementation for the Generator function that kinda looked like that: { orc::SymbolNameSet Added; orc::SymbolMap NewSymbols; for(auto &Name : Names) { Added.insert(Name); NewSymbols[Name] = //Something } Parent.define(absoluteSymbols(std::move(NewSymbols))); return Added; } I understood that "SymbolMap NewSymbols" will store a pair of name and the address to resolve - but why do I tell the JITDylib about this? And why do I also keep a map of the symbols I added and have to return them? (SymbolNameSet Added)...
2019 Jun 27
2
Questions about moving from MCJIT to Orc JIT
...> > 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 to the provided the Address. > > > > 3. Yes, all the class/function with legacy prefix will be removed in > subsequent releases. > > > > 4. Co...
2019 Sep 12
2
Questions after completed Kaleidoscope Chapter 1
...> > > > > > > for(auto &Name : Names) > > > > { > > > > Added.insert(Name); > > > > NewSymbols[Name] = //Something > > > > } > > > > > > > > Parent.define(absoluteSymbols(std::move(NewSymbols))); > > > > return Added; > > > > } > > > > > > > > I understood that “SymbolMap NewSymbols” will store a pair of name and > the address to resolve – but why do I tell the JITDylib about this? > > And why do I also...
2019 Aug 13
4
ORC v2 question
Hi Lang, On Tue, 13 Aug 2019 at 22:03, Lang Hames <lhames at gmail.com> wrote: > When you say your code is not getting optimized, do you mean that IR optimizations are not being applied, or that codegen optimizations are not being applied? > > What do you see if you dump the modules before/after running the pass manager on them, like this: > > dbgs() << "Before
2019 Jun 19
2
Questions about moving from MCJIT to Orc JIT
Hello LLVM-Mailing list, in the past I was using the MCJIT (if I understand it correctly) to load IR modules, compile them and execute them. The speciality of this JIT was, that it was writing the compiled code into a shared memory - for a different process to execute them. For that task the JIT used a 'custom' memory manager, memory mapping and also resolved undefined references itself.
2020 Sep 23
2
ORC JIT - Can modules independently managed with one LLJIT instance? + problems with ExecutionSession.lookup
...st).data()); if(adr) { NewSymbols[name.first] = llvm::JITEvaluatedSymbol(adr, llvm::JITSymbolFlags::Absolute); } else { notFound.push_back(name.first); } } JD.define(absoluteSymbols(std::move(NewSymbols))); return (notFound.size() == 0) ? llvm::Error::success() : llvm::make_error<llvm::orc::SymbolsNotFound>(std::move(notFound)); } When I use “llvm::orc::JITDylibLookupFlags::MatchExportedSymbolsOnly” then I will get 1 undefined Reference in the first run, but a to...
2020 Apr 13
2
LLVM 10 ORC2 issue with symbol resolution
...t; >> > > >> > llvm::JITEvaluatedSymbol(llvm::pointerToJITTargetAddress(global_syms[i].address), > > >> > > >> llvm::JITSymbolFlags(llvm::JITSymbolFlags::FlagNames::Absolute))}); > > >> } > > >> llvm::cantFail(JD.define(llvm::orc::absoluteSymbols(Symbols)), "Failed > > >> to install extern symbols"); > > >> > > >> FYI - my previous post on similar issue. > > >> Basically I haven't been able to get ORC v2 working - tried in 8, 9 > and now 10. > > >> > > >&g...
2020 Sep 24
2
ORC JIT - Can modules independently managed with one LLJIT instance? + problems with ExecutionSession.lookup
...st).data()); if(adr) { NewSymbols[name.first] = llvm::JITEvaluatedSymbol(adr, llvm::JITSymbolFlags::Absolute); } else { notFound.push_back(name.first); } } JD.define(absoluteSymbols(std::move(NewSymbols))); return (notFound.size() == 0) ? llvm::Error::success() : llvm::make_error<llvm::orc::SymbolsNotFound>(std::move(notFound)); } When I use “llvm::orc::JITDylibLookupFlags::MatchExportedSymbolsOnly” then I will get 1 undefined Reference in the first run, but a to...
2015 Mar 11
9
[LLVMdev] On LLD performance
I spent a week to optimize LLD performance and just wanted to share things what I found. Also if there's anyone who have a good idea on how to make it faster, I'd like to hear. My focus is mainly on Windows, but my optimizations are generally platform neutral. I aim both single-thread and multi-thread performance. r231434 <http://reviews.llvm.org/rL231454> is a change that has the