[PATCH] D19096: ThinLTO/ModuleLinker: add a flag to not always pull-in linkonce when performing importing

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 08:13:36 PDT 2016


tejohnson added a comment.

Thanks for splitting this out - it made me see what I missed before about where the new flag is being set. See comments below.

Also, should this be marked as dependent on http://reviews.llvm.org/D19308?


================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:424
@@ +423,3 @@
+    // Instruct the linker that the client will take care of linkonce resolution
+    unsigned Flags = Linker::Flags::DontForceLinkLinkonceODR;
+
----------------
This should be passed down from the client, not hardwired here. E.g. this resolution is not yet done in gold. E.g. pass down to importFunctions() or to FunctionImporter constructor.

================
Comment at: test/Linker/funcimport2.ll:6
@@ -5,3 +5,3 @@
 
-; CHECK: define linkonce_odr hidden void @foo() {
+; CHECK: define available_externally hidden void @foo() {
 define available_externally hidden void @foo() {
----------------
Looks like this change should be part of D19308 instead?

================
Comment at: test/ThinLTO/X86/Inputs/alias_resolution.ll:5
@@ +4,3 @@
+
+ at globalfuncAlias = alias void (...), bitcast (void ()* @globalfunc to void (...)*)
+ at globalfuncWeakAlias = weak alias void (...), bitcast (void ()* @globalfunc to void (...)*)
----------------
Looks like this was accidentally left in this patch (test/ThinLTO/X86/alias_resolution.ll is gone). Should this test now be part of D19308?


http://reviews.llvm.org/D19096





More information about the llvm-commits mailing list