diff options
author | Easwaran Raman <eraman@google.com> | 2016-05-19 21:07:12 +0000 |
---|---|---|
committer | Easwaran Raman <eraman@google.com> | 2016-05-19 21:07:12 +0000 |
commit | e5a17e3f1d1d620d0793f36f54654951a4440f99 (patch) | |
tree | 29453f82d5ec2e7a668a9bbceb7d8bc300ce0e73 /llvm/lib/ProfileData/SampleProfWriter.cpp | |
parent | b1d37199ccfad5654d587cb9a81bcfde613315b4 (diff) | |
download | bcm5719-llvm-e5a17e3f1d1d620d0793f36f54654951a4440f99.tar.gz bcm5719-llvm-e5a17e3f1d1d620d0793f36f54654951a4440f99.zip |
Move ProfileSummary to IR.
This splits ProfileSummary into two classes: a ProfileSummary class that has methods to convert from/to metadata and a ProfileSummaryBuilder class that computes the profiles summary which is in ProfileData.
Differential Revision: http://reviews.llvm.org/D20314
llvm-svn: 270136
Diffstat (limited to 'llvm/lib/ProfileData/SampleProfWriter.cpp')
-rw-r--r-- | llvm/lib/ProfileData/SampleProfWriter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/ProfileData/SampleProfWriter.cpp b/llvm/lib/ProfileData/SampleProfWriter.cpp index 2f6490224c5..56e836c69cd 100644 --- a/llvm/lib/ProfileData/SampleProfWriter.cpp +++ b/llvm/lib/ProfileData/SampleProfWriter.cpp @@ -255,10 +255,10 @@ SampleProfileWriter::create(std::unique_ptr<raw_ostream> &OS, void SampleProfileWriter::computeSummary( const StringMap<FunctionSamples> &ProfileMap) { - Summary.reset(new SampleProfileSummary(ProfileSummary::DefaultCutoffs)); + SampleProfileSummaryBuilder Builder(ProfileSummaryBuilder::DefaultCutoffs); for (const auto &I : ProfileMap) { const FunctionSamples &Profile = I.second; - Summary->addRecord(Profile); + Builder.addRecord(Profile); } - Summary->computeDetailedSummary(); + Summary.reset(Builder.getSummary()); } |