[PATCH] D20390: Remove specializations of ProfileSummary (InstrProfSummary and SampleProfileSummary)

Easwaran Raman via llvm-commits llvm-commits at lists.llvm.org
Thu May 19 14:10:17 PDT 2016


eraman added inline comments.

================
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; }
----------------
silvas wrote:
> As more passes start using these methods, you may want to add some documentation to them or rename them to be more clear.
I'm struggling to come up with better names - your suggestions are welcome. In any case, the plan is to provide an immutable analysis pass that will consume the profile summary and provide APIs like "isHotCount" for the optimization passes to use. 


http://reviews.llvm.org/D20390





More information about the llvm-commits mailing list