Displaying 3 results from an estimated 3 matches for "linkifneeded".
2016 Apr 20
2
Lazily Loaded Modules and Linker::LinkOnlyNeeded
...s ripping out functions that
weren't used.
So I tried it, and it failed. Basically any function that was still to
be materialized wasn't getting its body copied over during linking.
The only line of code that differs when you set LinkOnlyNeeded is in
LinkModules.cpp -> ModuleLinker::linkIfNeeded:
if (shouldLinkOnlyNeeded() && !(DGV && DGV->isDeclaration()))
return false;
The isDeclaration() for functions has a call to isMaterializable().
Things I've tried:
* If I don't pass LinkOnlyNeeded but still link from the lazily loaded
runtime module into t...
2016 Apr 20
2
Lazily Loaded Modules and Linker::LinkOnlyNeeded
...hat weren't used.
>
> So I tried it, and it failed. Basically any function that was still to be
> materialized wasn't getting its body copied over during linking.
>
> The only line of code that differs when you set LinkOnlyNeeded is in
> LinkModules.cpp -> ModuleLinker::linkIfNeeded:
>
> if (shouldLinkOnlyNeeded() && !(DGV && DGV->isDeclaration()))
> return false;
>
>
> The isDeclaration() for functions has a call to isMaterializable().
>
> Things I've tried:
>
> - If I don't pass LinkOnlyNeeded but still link fro...
2016 Apr 21
4
Lazily Loaded Modules and Linker::LinkOnlyNeeded
Hey all,
For LinkModules, /*dest*/ is a fully materialized module, /*src*/ is a
lazily loaded module.
From what I understood, getLinkedToGlobal() is finding the function in
/*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