[PATCH] D24617: [LTO] Prevent asm undefined references to be dropped from the output

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 15 16:38:16 PDT 2016


On Thu, Sep 15, 2016 at 2:16 PM, Mehdi AMINI via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> mehdi_amini added inline comments.
>
> ================
> Comment at: lib/LTO/LTO.cpp:368
> @@ -367,3 +382,3 @@
>    assert(ResI == Res.end());
>
>    return RegularLTO.Mover->move(Obj->takeModule(), Keep,
> ----------------
> Why don't you update compiler.used here before merging? This way the StringSet could be local to this function and not global to the LTO class/lifetime I believe.
>

One minor complication is that we don't have a TargetMachine at that
point. We could create a TargetMachine earlier and pass around. Or we
could create TargetMachine two times, but that seems a little bit
weird to me.
In general, I don't see that as an improvement, but I'd like to hear
what others have to say.

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list