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

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 16:32:01 PST 2017


mehdi_amini accepted this revision.
mehdi_amini added a comment.
This revision is now accepted and ready to land.

LGTM, but please wait for Teresa :)



================
Comment at: llvm/lib/Transforms/IPO/FunctionImport.cpp:724
     for (GlobalAlias &GA : SrcModule->aliases()) {
+      if (FunctionImportGlobalProcessing::doImportAsDefinition(
+              &GA, &GlobalsToImport)) {
----------------
pcc wrote:
> tejohnson wrote:
> > 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...
> Yes, this was needed in order to be NFC. I've added a FIXME to remove.
> I didn't realize or had forgotten that the ModuleLinker would do this

This is exactly what always bothered me with us using the ModuleLinker instead of the IRMover :)


https://reviews.llvm.org/D29468





More information about the llvm-commits mailing list