[SampleFDO] Add FunctionOffsetTable in compact binary format profile.
ClosedPublic

Authored by wmi on Mon, Sep 10, 9:09 AM.

Details

Summary

The patch saves a function offset table which maps function name index to the offset of its function profile to the start of the binary profile. By using the function offset table, for those function profiles which will not be used when compiling a module, the profile reader does't have to read them. For profile size around 10~20M, it saves ~10% compile time.

Diff Detail

Repository
rL LLVM
wmi created this revision.Mon, Sep 10, 9:09 AM
danielcdh accepted this revision.Mon, Sep 10, 10:20 AM
This revision is now accepted and ready to land.Mon, Sep 10, 10:20 AM
wmi updated this revision to Diff 164702.Mon, Sep 10, 11:00 AM

Add some cleanup, please take another look:
Add virtual function collectFuncsToUse to remove the awareness of format change in sample profile loader pass.

danielcdh accepted this revision.Fri, Sep 14, 11:46 AM
This revision was automatically updated to reflect the committed changes.