This is an archive of the discontinued LLVM Phabricator instance.

Add pagerando binning pass
Needs ReviewPublic

Authored by rinon on Sep 7 2017, 12:23 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

The PagerandoBinning pass packs pagerando-compatible functions into page-aligned
bins for loading as position-independent segments. The pass uses a first fit
algorithm to minimize wasted space in bins. Only functions marked with the
pagerando attribute are placed into bins.

Functions are associated with a chosen bin by setting an explicit section prefix
string containing the bin id. Functions in the same bin will then be placed into
the same section when writing the output file.

This patch set (D37580, D37581, D37582, D37583, D37584, D37585, D37586, D37587)
is a first draft of the pagerando implementation described in
http://lists.llvm.org/pipermail/llvm-dev/2017-June/113794.html.

Diff Detail

Event Timeline

rinon created this revision.Sep 7 2017, 12:23 PM
rinon updated this revision to Diff 114742.Sep 11 2017, 6:25 PM
  • Fix style nit
rinon edited the summary of this revision. (Show Details)Oct 31 2017, 6:01 PM
rinon updated this revision to Diff 140716.Apr 2 2018, 5:41 PM
  • Add profile-guided pagerando binning algorithm
  • Rebase
rinon updated this revision to Diff 156643.Jul 20 2018, 4:57 PM

Rebase

  • Fix first-fit algorithm test after adding PGO binning.