[PATCH] D18415: [LTO] Basic support for internalize.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 09:45:29 PDT 2016


On 23 March 2016 at 19:40, Mehdi AMINI <mehdi.amini at apple.com> wrote:
> joker.eph added inline comments.
>
> ================
> Comment at: ELF/LTO.cpp:107
> @@ -98,1 +106,3 @@
> +            Internalize.insert(GV->getName());
> +
>            Keep.push_back(GV);
> ----------------
> Can't you change the linkage here immediately instead of using s StringSet.

Unfortunately not.

The problem is that we want to

* import the symbol 'foo', satisfying undefined references to it.
* internalize it

If the order is changed, the IRMover will just rename 'foo'.

It would be nice to do this without using strings, but I think that is
what is currently possible with the existing IRMover.

> As a side note, I usually not look at lld but in general this code is lacking documentation, if it was in LLVM it would require a lot more.

Yes, a comment with, for example, the above explanation would be nice :-)


More information about the llvm-commits mailing list