This is an archive of the discontinued LLVM Phabricator instance.

[SampleFDO][NFC] Move the core implementation of Sample Profile Loader to a template
AbandonedPublic

Authored by xur on Jan 29 2021, 1:51 PM.

Details

Reviewers
davidxl
wmi
Summary

Refactored Sample Profile Loader implementation so we can use the same code in Machine level IR. This is mainly for using in the
Flow Sensitive SampleFDO. I did change some of the interfaces to simplify the code in the templates. But I think this is mostly NFC.

Diff Detail

Event Timeline

xur created this revision.Jan 29 2021, 1:51 PM
xur requested review of this revision.Jan 29 2021, 1:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 29 2021, 1:51 PM

The diff is quite large and it is better to be broken down into smaller pieces in stages.

Stage 1: make selected member functions of the loader as inline functions inside the class (not introducing the new file)
Stage 2: move sampleloader class into a header file without introducing the template parameter
stage 3: templatizing the sampleLoader class
stage 4: possible other things.

This will make downstream integration/merging and the review process easier.

wenlei added a subscriber: hoy.Feb 1 2021, 10:35 AM

The diff is quite large and it is better to be broken down into smaller pieces in stages.

Stage 1: make selected member functions of the loader as inline functions inside the class (not introducing the new file)
Stage 2: move sampleloader class into a header file without introducing the template parameter
stage 3: templatizing the sampleLoader class
stage 4: possible other things.

This will make downstream integration/merging and the review process easier.

+1, thanks for being considerate about downstream. cc: @hoy

xur abandoned this revision.Feb 19 2021, 10:52 AM