[PATCH] D18674: [ThinLTO/gold] Change preempted def to avail extern linkage when possible

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri May 27 14:21:25 PDT 2016


tejohnson abandoned this revision.
tejohnson added a comment.

Thanks for the review. I'm going to abandon these however and instead use the support I just refactored out of ThinLTOCodeGenerator in r270698, which will do the same using a callback to get info about prevailing symbols.


================
Comment at: test/tools/gold/X86/thinlto_linkonceresolution.ll:28
@@ +27,3 @@
+; OPT-DAG: define available_externally hidden void @f()
+; OPT-DAG: declare extern_weak hidden void @h()
+; Cannot convert alias or aliasee to available_externally (not a valid
----------------
rafael wrote:
> It just be just extern, not extern_weak, no?
Yes, this line was changed in r266752 after Mehdi changed this in the ModuleLinker, but I hadn't rebased for awhile.

================
Comment at: tools/gold/gold-plugin.cpp:785
@@ +784,3 @@
+          // FIXME: Turn the alias into a global and duplicate the definition.
+          !isa<GlobalAlias>(GV))
+        // Convert later if this is not found to be an aliasee.
----------------
rafael wrote:
> If the alias is preempted, you can turn it to a global variable declaration.
True, but that would prevent inlining. Probably better to keep the inlining opportunity intact.


http://reviews.llvm.org/D18674





More information about the llvm-commits mailing list