[#llvm-StaticDataProfileInfo] = xref:llvm.adoc[llvm]::StaticDataProfileInfo :relfileprefix: ../ :mrdocs: A class that holds the constants that represent static data and their profile information and provides methods to operate on them. == Synopsis Declared in `<llvm/Analysis/StaticDataProfileInfo.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class StaticDataProfileInfo; ---- == Enums [cols="1,4"] |=== | Name| Description | xref:llvm/StaticDataProfileInfo/StaticDataHotness.adoc[`StaticDataHotness`] | Use signed enums for enum value comparison, and make 'LukewarmOrUnknown' as 0 so any accidentally uninitialized value will default to unknown. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/StaticDataProfileInfo/2constructor.adoc[`StaticDataProfileInfo`] [.small]#[constructor]# | Construct StaticDataProfileInfo with data‐access profile combining `EnableDataAccessProf.` | xref:llvm/StaticDataProfileInfo/addConstantProfileCount.adoc[`addConstantProfileCount`] | Add or clear the profile count for constant `C.` | xref:llvm/StaticDataProfileInfo/getConstantHotnessUsingProfileCount.adoc[`getConstantHotnessUsingProfileCount`] | Return the hotness of the constant `C` based on its profile count `Count.` | xref:llvm/StaticDataProfileInfo/getConstantProfileCount.adoc[`getConstantProfileCount`] | If `C` has a count, return it. Otherwise, return std::nullopt. | xref:llvm/StaticDataProfileInfo/getConstantSectionPrefix.adoc[`getConstantSectionPrefix`] | Return a section prefix for constant `C` based on profile data. | xref:llvm/StaticDataProfileInfo/getSectionHotnessUsingDataAccessProfile.adoc[`getSectionHotnessUsingDataAccessProfile`] | Return the hotness based on section prefix `SectionPrefix.` | xref:llvm/StaticDataProfileInfo/hotnessToStr.adoc[`hotnessToStr`] | Return the string representation of the hotness enum `Hotness.` |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:llvm/StaticDataProfileInfo/ConstantProfileCounts.adoc[`ConstantProfileCounts`] | Maps tracked constants to their accumulated profile counts. | xref:llvm/StaticDataProfileInfo/ConstantWithoutCounts.adoc[`ConstantWithoutCounts`] | Keeps track of the constants that are seen at least once without profile counts. | xref:llvm/StaticDataProfileInfo/EnableDataAccessProf.adoc[`EnableDataAccessProf`] | When true, combine data‐access profile hotness with PGO counts for section prefixes. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#