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

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 08:29:47 PDT 2016


joker.eph added inline comments.

================
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;
+
----------------
tejohnson wrote:
> 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.
Will update

================
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() {
----------------
tejohnson wrote:
> Looks like this change should be part of D19308 instead?
I don't think so: it is testing that we don't import foo (we're still seeing the original definition). So it is not about the resolution in D19308 

================
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 (...)*)
----------------
tejohnson wrote:
> 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?
Yes,


http://reviews.llvm.org/D19096





More information about the llvm-commits mailing list