Remove specializations of ProfileSummary
This removes the subclasses of ProfileSummary, moves the members of the derived classes to the base class.
Differential Revision: http://reviews.llvm.org/D20390
llvm-svn: 270143
diff --git a/llvm/lib/ProfileData/InstrProfWriter.cpp b/llvm/lib/ProfileData/InstrProfWriter.cpp
index 1036a10..e9543ce 100644
--- a/llvm/lib/ProfileData/InstrProfWriter.cpp
+++ b/llvm/lib/ProfileData/InstrProfWriter.cpp
@@ -195,17 +195,16 @@
}
static void setSummary(IndexedInstrProf::Summary *TheSummary,
- InstrProfSummary &PS) {
+ ProfileSummary &PS) {
using namespace IndexedInstrProf;
std::vector<ProfileSummaryEntry> &Res = PS.getDetailedSummary();
TheSummary->NumSummaryFields = Summary::NumKinds;
TheSummary->NumCutoffEntries = Res.size();
TheSummary->set(Summary::MaxFunctionCount, PS.getMaxFunctionCount());
- TheSummary->set(Summary::MaxBlockCount, PS.getMaxBlockCount());
- TheSummary->set(Summary::MaxInternalBlockCount,
- PS.getMaxInternalBlockCount());
+ TheSummary->set(Summary::MaxBlockCount, PS.getMaxCount());
+ TheSummary->set(Summary::MaxInternalBlockCount, PS.getMaxInternalCount());
TheSummary->set(Summary::TotalBlockCount, PS.getTotalCount());
- TheSummary->set(Summary::TotalNumBlocks, PS.getNumBlocks());
+ TheSummary->set(Summary::TotalNumBlocks, PS.getNumCounts());
TheSummary->set(Summary::TotalNumFunctions, PS.getNumFunctions());
for (unsigned I = 0; I < Res.size(); I++)
TheSummary->setEntry(I, Res[I]);
@@ -260,8 +259,8 @@
IndexedInstrProf::allocSummary(SummarySize);
// Compute the Summary and copy the data to the data
// structure to be serialized out (to disk or buffer).
- InstrProfSummary *IPS = ISB.getSummary();
- setSummary(TheSummary.get(), *IPS);
+ ProfileSummary *PS = ISB.getSummary();
+ setSummary(TheSummary.get(), *PS);
InfoObj->SummaryBuilder = 0;
// Now do the final patch: