[llvm] [ThinLTO] Add HasLocal flag to GlobalValueSummaryInfo (PR #164647)
Mingming Liu via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 22 10:30:11 PDT 2025
================
@@ -183,6 +185,22 @@ struct alignas(8) GlobalValueSummaryInfo {
/// compiling without sufficient distinguishing path, or (theoretically) hash
/// collisions. Each summary is from a different module.
GlobalValueSummaryList SummaryList;
+
+ /// True if the SummaryList contains at least one summary with local linkage.
+ /// In most cases there should be only one, unless translation units with
+ /// same-named locals were compiled without distinguishing path. And generally
+ /// there should not be a mix of local and non-local summaries, because the
+ /// GUID for a local is computed with the path prepended and a ':' delimiter.
----------------
mingmingl-llvm wrote:
```suggestion
/// GUID for a local is computed with the path prepended and a ';' delimiter.
```
nit pick: PGO name delimiter is semicolon ([code](https://github.com/llvm/llvm-project/blob/e2ad55499197db540d09e7201b9b80366a0908c3/llvm/include/llvm/IR/GlobalValue.h#L45-L47)); Clang's frontend code coverage still uses ':' ([code](https://github.com/llvm/llvm-project/blob/e2ad55499197db540d09e7201b9b80366a0908c3/llvm/lib/ProfileData/InstrProf.cpp#L314-L321))
https://github.com/llvm/llvm-project/pull/164647
More information about the llvm-commits
mailing list