Page MenuHomePhabricator

[HotColdSplitting] Use TTI to inform outlining threshold
ClosedPublic

Authored by vsk on Oct 29 2018, 2:41 PM.

Details

Summary

Using TargetTransformInfo allows the splitting pass to factor in the
code size cost of instructions as it decides whether or not outlining is
profitable.

This did not regress the overall amount of outlining seen on the handful
of internal frameworks I tested.

Thanks to Jun Bum Lim for suggesting this!

Diff Detail

Repository
rL LLVM

Event Timeline

vsk created this revision.Oct 29 2018, 2:41 PM
vsk updated this revision to Diff 171581.Oct 29 2018, 2:57 PM
  • Move a test that's particularly X86-specific into an X86 directory.
sebpop accepted this revision.Oct 29 2018, 3:56 PM

Looks good to me.

llvm/lib/Transforms/IPO/HotColdSplitting.cpp
70 ↗(On Diff #171581)

You may want to tune the magic constant 3 for the new way of computing code size.

This revision is now accepted and ready to land.Oct 29 2018, 3:56 PM
This revision was automatically updated to reflect the committed changes.