[llvm] [StaticDataLayout][PGO] Add profile format for static data layout, and the classes to operate on the profiles. (PR #138170)

Mingming Liu via llvm-commits llvm-commits at lists.llvm.org
Tue May 6 13:05:38 PDT 2025


================
@@ -357,6 +357,12 @@ void createPGONameMetadata(GlobalObject &GO, StringRef PGOName);
 /// the duplicated profile variables for Comdat functions.
 bool needsComdatForCounter(const GlobalObject &GV, const Module &M);
 
+/// \c NameStrings is a string composed of one of more possibly encoded
+/// sub-strings. The substrings are separated by 0 or more zero bytes. This
----------------
mingmingl-llvm wrote:

Done by mentioning the substrings are separated by `\01`, which is [returned](https://github.com/llvm/llvm-project/blob/ad5b3e01fbc81337ad8d91663fc6d0624a251e14/llvm/lib/ProfileData/InstrProf.cpp#L727) by `getInstrProfNameSeparator`.

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


More information about the llvm-commits mailing list