[PATCH] D20390: Remove specializations of ProfileSummary (InstrProfSummary and SampleProfileSummary)
Sean Silva via llvm-commits
llvm-commits at lists.llvm.org
Wed May 18 18:39:58 PDT 2016
silvas accepted this revision.
silvas added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: include/llvm/IR/ProfileSummary.h:77
@@ -82,22 +76,3 @@
uint64_t getMaxFunctionCount() { return MaxFunctionCount; }
-};
-
-class InstrProfSummary final : public ProfileSummary {
- uint64_t MaxInternalBlockCount;
-
-protected:
- std::vector<Metadata *> getFormatSpecificMD(LLVMContext &Context) override;
-
-public:
- InstrProfSummary(uint64_t TotalCount, uint64_t MaxBlockCount,
- uint64_t MaxInternalBlockCount, uint64_t MaxFunctionCount,
- uint32_t NumBlocks, uint32_t NumFunctions,
- SummaryEntryVector Summary)
- : ProfileSummary(PSK_Instr, Summary, TotalCount, MaxBlockCount,
- MaxFunctionCount, NumBlocks, NumFunctions),
- MaxInternalBlockCount(MaxInternalBlockCount) {}
- static bool classof(const ProfileSummary *PS) {
- return PS->getKind() == PSK_Instr;
- }
- uint32_t getNumBlocks() { return NumCounts; }
+ uint32_t getNumCounts() { return NumCounts; }
uint64_t getTotalCount() { return TotalCount; }
----------------
As more passes start using these methods, you may want to add some documentation to them or rename them to be more clear.
http://reviews.llvm.org/D20390
More information about the llvm-commits
mailing list