This is an archive of the discontinued LLVM Phabricator instance.

[HotColdSplit] Add options for splitting cold functions in separate section
ClosedPublic

Authored by rjf on Aug 5 2020, 10:53 AM.

Details

Summary

Add support for (if enabled) splitting cold functions into a separate section
in order to further boost locality of hot code.

Diff Detail

Event Timeline

rjf created this revision.Aug 5 2020, 10:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2020, 10:53 AM
rjf requested review of this revision.Aug 5 2020, 10:53 AM
rjf added a comment.Aug 5 2020, 10:55 AM

Will add test case soon.

Minor suggestions.

llvm/lib/Transforms/IPO/HotColdSplitting.cpp
91–92

Suggested description:
Enable the placement of extracted cold functions into a separate section after hot-cold splitting.

97

Suggested description:
Name for the section containing cold functions extracted by hot-cold splitting.

rjf updated this revision to Diff 283412.Aug 5 2020, 3:16 PM

Add tests

rjf updated this revision to Diff 283416.Aug 5 2020, 3:22 PM

Incorporate @rcorcs 's suggestions.

rjf marked 2 inline comments as done.EditedAug 5 2020, 3:23 PM

@rcorcs Your comments are addressed. Thanks!

rjf updated this revision to Diff 283418.Aug 5 2020, 3:28 PM

The tests are modified from split-cold-2.ll in the same folder. Add comments to note this.

hiraditya accepted this revision.Aug 9 2020, 7:16 AM
This revision is now accepted and ready to land.Aug 9 2020, 7:16 AM