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

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 08:52:19 PDT 2016


rafael added inline comments.

================
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
----------------
It just be just extern, not extern_weak, no?

================
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.
----------------
If the alias is preempted, you can turn it to a global variable declaration.

================
Comment at: tools/gold/gold-plugin.cpp:841
@@ +840,3 @@
+
+    if (!GV->hasComdat())
+      continue;
----------------
You can always set the comdat to null, so I would drop this if.


http://reviews.llvm.org/D18674





More information about the llvm-commits mailing list