This is an archive of the discontinued LLVM Phabricator instance.

[CSSPGO] Tweak ICP threshold in top-down inliner
ClosedPublic

Authored by wlei on Jul 22 2021, 1:06 PM.

Details

Summary

This change slightly relaxed the current ICP threshold in top-down inliner, specifically always allow one ICP for it. It shows some perf improvements on SPEC and our internal benchmarks. Also renamed the previous flag. We can also try to turn off PGO ICP in the future.

Diff Detail

Event Timeline

wlei created this revision.Jul 22 2021, 1:06 PM
wlei requested review of this revision.Jul 22 2021, 1:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 22 2021, 1:06 PM
wlei edited the summary of this revision. (Show Details)Jul 22 2021, 1:17 PM
wlei added reviewers: wenlei, hoy, wmi.
hoy accepted this revision.Jul 22 2021, 5:45 PM

LGTM, thanks for coming up with the new heuristic.

This revision is now accepted and ready to land.Jul 22 2021, 5:45 PM

Thanks for working on the tuning. The switch names could be confusing. How about name them this way:

  • sample-profile-icp-relative-hotness: default to 25.
  • sample-profile-icp-relative-hotness-skip: default to 1, with description "Skip relative hotness check for ICP up to given number of targets." (we have icp-csskip for PGO ICP, which is named similarly)
llvm/lib/Transforms/IPO/SampleProfile.cpp
202

always allow isn't accurate - we only skip the relative hotness check.

wlei updated this revision to Diff 361569.Jul 25 2021, 6:52 PM

renamed switches

wlei added a comment.Jul 25 2021, 6:52 PM

Thanks for working on the tuning. The switch names could be confusing. How about name them this way:

  • sample-profile-icp-relative-hotness: default to 25.
  • sample-profile-icp-relative-hotness-skip: default to 1, with description "Skip relative hotness check for ICP up to given number of targets." (we have icp-csskip for PGO ICP, which is named similarly)

Sounds good, thanks for the suggestions!

wenlei accepted this revision.Jul 25 2021, 9:24 PM
wmi accepted this revision.Jul 26 2021, 10:46 AM

LGTM.

This revision was landed with ongoing or failed builds.Jul 26 2021, 9:49 PM
This revision was automatically updated to reflect the committed changes.