[llvm] [CodeGen][StaticDataPartitioning]Place local-linkage global variables in hot or unlikely prefixed sections based on profile information (PR #125756)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 6 14:20:13 PST 2025


================
@@ -46,6 +49,20 @@ class StaticDataSplitter : public MachineFunctionPass {
   const MachineBlockFrequencyInfo *MBFI = nullptr;
   const ProfileSummaryInfo *PSI = nullptr;
 
+  // If the global value is a local linkage global variable, return it.
+  // Otherwise, return nullptr.
+  const GlobalVariable *getLocalLinkageGlobalVariable(const GlobalValue *GV);
+
+  // Returns true if the global variable is in one of {.rodata, .bss, .data,
+  // .data.rel.ro} sections
----------------
snehasish wrote:

nit: period at the end like the other comments?

https://github.com/llvm/llvm-project/pull/125756


More information about the llvm-commits mailing list