[llvm] [NFC][StaticDataProfileInfo] Refactor StaticDataProfileInfo::getConstantSectionPrefix and extract analysis based on PGO-counter to be a helper function (PR #162388)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 14 14:10:16 PDT 2025
================
@@ -44,6 +47,20 @@ class StaticDataProfileInfo {
LLVM_ABI std::optional<uint64_t>
getConstantProfileCount(const Constant *C) const;
+ enum class StaticDataHotness : uint8_t {
+ Cold = 0,
+ LukewarmOrUnknown = 1,
+ Hot = 2,
+ };
+
+ /// Return the hotness of the constant \p C based on its profile count \p
+ /// Count.
+ LLVM_ABI StaticDataHotness getSectionHotnessUsingProfileCount(
----------------
snehasish wrote:
Can we name this `getConstantHotnessUsingProfileCount`? I wasn't sure what is implied by the word section in the name.
https://github.com/llvm/llvm-project/pull/162388
More information about the llvm-commits
mailing list