The importer was previously using ModuleLinker in a sort of "IRMover mode". Use
IRMover directly instead in order to remove a level of indirection.
I will remove all importing support from ModuleLinker in a separate
change.
Paths
| Differential D29468
FunctionImport: Use IRMover directly. NFCI. ClosedPublic Authored by pcc on Feb 2 2017, 12:05 PM.
Details Summary The importer was previously using ModuleLinker in a sort of "IRMover mode". Use I will remove all importing support from ModuleLinker in a separate
Diff Detail
Event Timelinepcc added a child revision: D29470: ModuleLinker: Remove importing support. NFCI..Feb 2 2017, 12:43 PM
Comment Actions
Comment Actions LGTM, but please wait for Teresa :)
This revision is now accepted and ready to land.Feb 2 2017, 4:32 PM Comment Actions LGTM but please remove the NFC from the description, due to the isInterposable change and the comdat handling difference noted on IRC. I did build SPEC with this change and it isn't causing any failures (there is a failure to link soplex due to hidden symbols, but it is still there without this patch and likely due to D28978). Closed by commit rL294014: FunctionImport: Use IRMover directly. (authored by pcc). · Explain WhyFeb 3 2017, 9:07 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 86868 llvm/include/llvm/Transforms/Utils/FunctionImportUtils.h
llvm/lib/Linker/LinkModules.cpp
llvm/lib/Transforms/IPO/FunctionImport.cpp
llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
|
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...