Page MenuHomePhabricator

[HotColdSplitting] Allow outlining single-block cold regions

Authored by vsk on Oct 29 2018, 11:52 AM.



It can be profitable to outline single-block cold regions because they
may be large.

Allow outlining single-block regions if they have over some threshold of
non-debug, non-terminator instructions. I chose 3 as the threshold after
experimenting with several internal frameworks.

In practice, reducing the threshold further did not give much
improvement, whereas increasing it resulted in substantial regressions.

Diff Detail

Event Timeline

vsk created this revision.Oct 29 2018, 11:52 AM
sebpop accepted this revision.Oct 29 2018, 12:02 PM

Ok, thanks!

This revision is now accepted and ready to land.Oct 29 2018, 12:02 PM
This revision was automatically updated to reflect the committed changes.
junbuml added inline comments.
145 ↗(On Diff #171551)

Don't you think using TTI.getInstructionCost(&I, TargetTransformInfo::TCK_CodeSize) is the right thing to do instead of counting the number of instruction?

245 ↗(On Diff #171551)

Why don't you use MinOutliningInstCount directly in hasMinimumInstCount() instead of passing as a parameter?

vsk added inline comments.Oct 29 2018, 2:01 PM
145 ↗(On Diff #171551)

Thanks for suggesting this. I'll try this out and report back (with a patch if all goes well).

245 ↗(On Diff #171551)

Good point, I'll address this in a follow-up.