This is an archive of the discontinued LLVM Phabricator instance.

[LTO] Promote before performing weak resolution
ClosedPublic

Authored by mehdi_amini on Aug 17 2016, 3:41 PM.

Details

Summary

This was reversed compared to ThinLTOCodeGenerator for some reason,
and lead to an increased code-size on my tests. I figured that the
weak resolution may internalize a linkonce function, which will be
promoted immediately (and renamed), before being internalized again.

Diff Detail

Repository
rL LLVM

Event Timeline

mehdi_amini retitled this revision from to [LTO] Promote before performing weak resolution.
mehdi_amini updated this object.
mehdi_amini added a reviewer: tejohnson.
mehdi_amini added subscribers: llvm-commits, pcc.

I couldn't check if any gold test needs to be updated.

tejohnson edited edge metadata.Aug 17 2016, 3:45 PM

Will test on gold.

tejohnson accepted this revision.Aug 17 2016, 5:19 PM
tejohnson edited edge metadata.

Test needs fix but otherwise fine.

test/ThinLTO/X86/internalize.ll
10 ↗(On Diff #68439)

It passes only if I change the file name to "%t.o.1.2.internalize.bc"

Note there are two changes in the name: s/0/1/ and s/internalized/internalize/.

This revision is now accepted and ready to land.Aug 17 2016, 5:19 PM
mehdi_amini added inline comments.Aug 17 2016, 5:32 PM
test/ThinLTO/X86/internalize.ll
10 ↗(On Diff #68439)

Yes, annoyingly the suffix for the temporary names for the new API don't match the ThinLTOCodeGenerator ones. I had a local patch to correct this while I'm migrating.

This revision was automatically updated to reflect the committed changes.