This is an archive of the discontinued LLVM Phabricator instance.

[llvm-profgen] Use hot threshold for context merging and trimming
ClosedPublic

Authored by wenlei on Sep 21 2021, 6:19 PM.

Details

Summary

Without preinliner, we need to tune down the cold count cutoff to merge/trim more context to limit profile size for large components. However it doesn't make sense for cold threshold to be higher than hot threshold, so we now change to use hot threshold as merging/trimming cut off instead.

Diff Detail

Event Timeline

wenlei created this revision.Sep 21 2021, 6:19 PM
wenlei requested review of this revision.Sep 21 2021, 6:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 21 2021, 6:20 PM
hoy added inline comments.Sep 21 2021, 6:34 PM
llvm/tools/llvm-profgen/ProfileGenerator.cpp
431

Does it still make sense to keep this? Would profile summary builder use this value?

wenlei added inline comments.Sep 21 2021, 7:03 PM
llvm/tools/llvm-profgen/ProfileGenerator.cpp
431

Profile summary builder still use it, but the removed tuning was only needed for merging/trimming. Now that merging/trimming changed to use hot threshold, the tuning is no longer needed either. The tuning may not general enough for a good cold threshold.

hoy accepted this revision.Sep 21 2021, 8:26 PM
hoy added inline comments.
llvm/tools/llvm-profgen/ProfileGenerator.cpp
431

Sounds good.

This revision is now accepted and ready to land.Sep 21 2021, 8:26 PM
This revision was landed with ongoing or failed builds.Sep 22 2021, 3:02 PM
This revision was automatically updated to reflect the committed changes.