Displaying 7 results from an estimated 7 matches for "linkonlyneeded".
2016 Apr 20
2
Lazily Loaded Modules and Linker::LinkOnlyNeeded
TL;DR - when linking from a lazily loaded module and using
Linker::LinkOnlyNeeded, bodies of used functions aren't being copied
during linking.
Previously on one of our products, we would lazily load our runtime
module (around 9000 functions), and link some user module into this
(which is in all practical use cases much smaller). Then, post linking,
we have a pass that...
2016 Apr 20
2
Lazily Loaded Modules and Linker::LinkOnlyNeeded
+cc Artem, who added the LinkOnlyNeeded flag.
On Wed, Apr 20, 2016 at 9:18 AM, Mehdi Amini via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi Neil,
>
> On Apr 20, 2016, at 5:20 AM, Neil Henning via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
> TL;DR - when linking from a lazily loaded module and...
2016 Apr 21
4
Lazily Loaded Modules and Linker::LinkOnlyNeeded
.../*src*/ that matches some function declaration in /*dest*/, and given
that /*src*/ is lazily loaded it could be un-materialized.
The functions I need brought in from /*src*//**/ into /*dest*/ are
always declarations in /*dest*/. The problem is that (for some reason)
the combination of Linker::LinkOnlyNeeded and a function that is not
materialized will not copy the function body from /*src*/ into /*dest*/.
Cheers,
-Neil.
On 20/04/16 20:39, Teresa Johnson wrote:
>
>
> On Wed, Apr 20, 2016 at 12:28 PM, Rafael EspĂndola
> <rafael.espindola at gmail.com <mailto:rafael.espindola at gma...
2017 Jun 20
2
JIT, LTO and @llvm.global_ctors: Looking for advise
...>, llvm-dev
<llvm-dev at lists.llvm.org>, Lang Hames <lhames at gmail.com>, Teresa Johnson
<tejohnson at google.com>
Subject: Re: [llvm-dev] JIT, LTO and @llvm.global_ctors: Looking for
advise
>+Lang (for JIT) & Teresa (for LTO/ThinLTO).
>
>Sounds like maybe the LinkOnlyNeeded got reused for a bit more than the
>original intent & maybe there should be more than one flag here - not
>sure.
>
>On Mon, Jun 19, 2017 at 9:16 AM Benoit Belley via llvm-dev
><llvm-dev at lists.llvm.org> wrote:
>
>
>Hi Everyone,
>
>We are looking for advise...
2017 Jun 19
2
JIT, LTO and @llvm.global_ctors: Looking for advise
...ning to move to ORC
very soon.
Our LLVM module linking code goes roughly as follows:
Linker linker(jittedModule);
std::unique_ptr<llvm::Module> moduleToLink(
getLazyIRFileModule(bcFileName, error, context));
linker.linkInModule(std::move(module),
Linker::LinkOnlyNeeded |
Linker::InternalizeLinkedSymbol);
Our issue is with the Linker::LinkOnlyNeeded flag. Using it has a huge
positive impact on link and compilation time :-). But, it causes the
@llvm.global_ctors and @llvm.global_dtors references from the
linked-in modules to be discarded :-(....
2017 Jun 20
2
JIT, LTO and @llvm.global_ctors: Looking for advise
Thanks Peter, this is very useful feedback.
I did manage to change the behavior of LinkOnlyNeeded to correctly import
all variables with AppendingLinkage. In fact, I discovered that there was
already something fishy. A variable with AppendingLinkage would get
imported correctly from the source module if the destination module
already contained a definition for that variable and wouldn't be...
2016 Apr 20
2
Lazily Loaded Modules and Linker::LinkOnlyNeeded
>
>
> I understood from his description that he reversed the destination and
> source so that destination is the user code.
> I assumed it was not lazy loaded, but that would explain the question then
> :)
>
> Neil: can you clarify? If Teresa is right, why aren't you materializing
> the destination module entirely?
>
>
I don't think it has ever been tried