[PATCH] D29468: FunctionImport: Use IRMover directly. NFCI.

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 13:17:27 PST 2017


tejohnson added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/FunctionImport.cpp:724
     for (GlobalAlias &GA : SrcModule->aliases()) {
+      if (FunctionImportGlobalProcessing::doImportAsDefinition(
+              &GA, &GlobalsToImport)) {
----------------
I guess you have to do this to make it NFC, since it looks like we were doing this in the ModuleLinker.
Interesting...I didn't realize or had forgotten that the ModuleLinker would do this - so essentially we always import an alias if its aliasee is linkonce_odr and marked for import? That seems like something we want to get rid of (can be in a follow-up change so this remains NFC). We've tried to get to the point where we only import values decided on by the thin link. This is presumably a holdover from the old scheme of always importing linkonce_odr references...


================
Comment at: llvm/lib/Transforms/Utils/FunctionImportUtils.cpp:28
   if (auto *GA = dyn_cast<GlobalAlias>(SGV)) {
-    if (GA->hasWeakAnyLinkage())
+    if (GA->isInterposable())
       return false;
----------------
This looks like a bug fix?


https://reviews.llvm.org/D29468





More information about the llvm-commits mailing list