[llvm] 4f352d4 - [NFC] [PSI] explain encoding of PercentileCutoff.

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 27 13:41:42 PDT 2021


Author: Florian Mayer
Date: 2021-09-27T21:41:33+01:00
New Revision: 4f352d444ecf818a00cee354cdcd0c5b9100a6f5

URL: https://github.com/llvm/llvm-project/commit/4f352d444ecf818a00cee354cdcd0c5b9100a6f5
DIFF: https://github.com/llvm/llvm-project/commit/4f352d444ecf818a00cee354cdcd0c5b9100a6f5.diff

LOG: [NFC] [PSI] explain encoding of PercentileCutoff.

Reviewed By: mtrofin, davidxl

Differential Revision: https://reviews.llvm.org/D109764

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/ProfileSummaryInfo.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/ProfileSummaryInfo.h b/llvm/include/llvm/Analysis/ProfileSummaryInfo.h
index c95404d96f4e3..8a5ab1ba6303d 100644
--- a/llvm/include/llvm/Analysis/ProfileSummaryInfo.h
+++ b/llvm/include/llvm/Analysis/ProfileSummaryInfo.h
@@ -134,9 +134,13 @@ class ProfileSummaryInfo {
   bool isColdCount(uint64_t C) const;
   /// Returns true if count \p C is considered hot with regard to a given
   /// hot percentile cutoff value.
+  /// PercentileCutoff is encoded as a 6 digit decimal fixed point number, where
+  /// the first two digits are the whole part. E.g. 995000 for 99.5 percentile.
   bool isHotCountNthPercentile(int PercentileCutoff, uint64_t C) const;
   /// Returns true if count \p C is considered cold with regard to a given
   /// cold percentile cutoff value.
+  /// PercentileCutoff is encoded as a 6 digit decimal fixed point number, where
+  /// the first two digits are the whole part. E.g. 995000 for 99.5 percentile.
   bool isColdCountNthPercentile(int PercentileCutoff, uint64_t C) const;
   /// Returns true if BasicBlock \p BB is considered hot.
   bool isHotBlock(const BasicBlock *BB, BlockFrequencyInfo *BFI) const;
@@ -144,10 +148,14 @@ class ProfileSummaryInfo {
   bool isColdBlock(const BasicBlock *BB, BlockFrequencyInfo *BFI) const;
   /// Returns true if BasicBlock \p BB is considered hot with regard to a given
   /// hot percentile cutoff value.
+  /// PercentileCutoff is encoded as a 6 digit decimal fixed point number, where
+  /// the first two digits are the whole part. E.g. 995000 for 99.5 percentile.
   bool isHotBlockNthPercentile(int PercentileCutoff, const BasicBlock *BB,
                                BlockFrequencyInfo *BFI) const;
   /// Returns true if BasicBlock \p BB is considered cold with regard to a given
   /// cold percentile cutoff value.
+  /// PercentileCutoff is encoded as a 6 digit decimal fixed point number, where
+  /// the first two digits are the whole part. E.g. 995000 for 99.5 percentile.
   bool isColdBlockNthPercentile(int PercentileCutoff, const BasicBlock *BB,
                                 BlockFrequencyInfo *BFI) const;
   /// Returns true if the call site \p CB is considered hot.


        


More information about the llvm-commits mailing list