[PATCH] D18415: [LTO] Basic support for internalize.
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 24 18:05:59 PDT 2016
On Mar 24, 2016 4:10 PM, "Davide Italiano" <dccitaliano at gmail.com> wrote:
>
> davide marked 4 inline comments as done.
> davide added a comment.
>
> Oh, the testcase was there before (just didn't show up in my last rev,
weird).
> Addressing some of your comments + reply.
>
>
> ================
> Comment at: ELF/LTO.cpp:113
> @@ +112,3 @@
> + // symbols when creating a shared library.
> + if (!Config->Shared && !Used.count(GV) &&
!B->isUsedInRegularObj())
> + InternalizedSyms.insert(GV->getName());
> ----------------
> rafael wrote:
> > ExportDynamic should have the same treatment as shared. Not sure if we
already have a convenient predicate for either.
> Can I do this separately? (And add a specific test for it)
Yes, good point.
> ================
> Comment at: ELF/SymbolTable.cpp:221
> @@ +220,3 @@
> + if (auto *BC = dyn_cast<DefinedBitcode>(Existing))
> + if (auto *U = dyn_cast<Undefined>(New))
> + BC->setUsedInRegularObj();
> ----------------
> rafael wrote:
> > I am not sure just Undefined is sufficient.
> >
> > If a weak symbol in an object file is replaced with a strong symbol in
a .bc file, there can be a reference from the strong symbol to the bit code
one.
> >
> Can I do this separately?
This one I think is simpler if you do it now. Basically it is not important
if the symbol is undefined or not. Just that it is from an object file.
>
>
> http://reviews.llvm.org/D18415
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160324/861a40df/attachment.html>
More information about the llvm-commits
mailing list