This is an archive of the discontinued LLVM Phabricator instance.

[HotColdSplitting] Attach MinSize to outlined code
ClosedPublic

Authored by vsk on Oct 22 2018, 11:39 AM.

Details

Summary

Outlined code is cold by assumption, so it makes more sense to optimize
it for minimal code size versus performance.

After r344869 moved the splitting pass to the end of the IR pipeline,
this does not result in much of a code size reduction. Only a small
number backend transforms make use of the MinSize hint.

Running LNT on x86_64, I see that 33/1020 binaries shrink for a total of
919 bytes of TEXT reduction. I didn't measure a significant performance
impact.

Diff Detail

Repository
rL LLVM

Event Timeline

vsk created this revision.Oct 22 2018, 11:39 AM
This revision is now accepted and ready to land.Oct 23 2018, 10:06 AM
This revision was automatically updated to reflect the committed changes.