[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:14 PST 2025


================
@@ -124,6 +124,17 @@ class GlobalObject : public GlobalValue {
   /// appropriate default object file section.
   void setSection(StringRef S);
 
+  /// Set the section prefix for this global object.
+  void setSectionPrefix(StringRef Prefix);
+
+  /// Update the section prefix, unless the existing prefix is the same as
+  /// `KeepPrefix`.
+  bool updateSectionPrefix(StringRef Prefix,
----------------
snehasish wrote:

Don't forget to drop this after merging #125757.

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


More information about the llvm-commits mailing list