[llvm] cc6f111 - [ProfileData] Remove toCompress and setToCompress from ProfileSymbolList (NFC) (#216236)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 13:17:44 PDT 2026
Author: Kazu Hirata
Date: 2026-08-14T13:17:39-07:00
New Revision: cc6f1115b0e913f020ea815c17f2f3cd2605aa50
URL: https://github.com/llvm/llvm-project/commit/cc6f1115b0e913f020ea815c17f2f3cd2605aa50
DIFF: https://github.com/llvm/llvm-project/commit/cc6f1115b0e913f020ea815c17f2f3cd2605aa50.diff
LOG: [ProfileData] Remove toCompress and setToCompress from ProfileSymbolList (NFC) (#216236)
This patch removes toCompress, setToCompress, and ToCompress in
ProfileSymbolList. Nobody calls setToCompress, so ToCompress is
always false.
Added:
Modified:
llvm/include/llvm/ProfileData/SampleProf.h
llvm/lib/ProfileData/SampleProfWriter.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/ProfileData/SampleProf.h b/llvm/include/llvm/ProfileData/SampleProf.h
index f2dd11f86cf01..f439b704d897a 100644
--- a/llvm/include/llvm/ProfileData/SampleProf.h
+++ b/llvm/include/llvm/ProfileData/SampleProf.h
@@ -1704,9 +1704,6 @@ class ProfileSymbolList {
unsigned size() const { return IsMD5 ? ColdGUIDTable.size() : Syms.size(); }
void reserve(size_t Size) { Syms.reserve(Size); }
- void setToCompress(bool TC) { ToCompress = TC; }
- bool toCompress() { return ToCompress; }
-
std::vector<uint64_t> collectGUIDs() const {
assert(!IsMD5 &&
"Collecting GUIDs from existing MD5 table not yet implemented");
@@ -1736,10 +1733,6 @@ class ProfileSymbolList {
private:
bool IsMD5 = false;
- // Determine whether or not to compress the symbol list when
- // writing it into profile. The variable is unused when the symbol
- // list is read from an existing profile.
- bool ToCompress = false;
DenseSet<StringRef> Syms;
EytzingerTableSpan<support::ulittle64_t> ColdGUIDTable;
BumpPtrAllocator Allocator;
diff --git a/llvm/lib/ProfileData/SampleProfWriter.cpp b/llvm/lib/ProfileData/SampleProfWriter.cpp
index 9cb9bf5af9f6a..c8fb9b56802f7 100644
--- a/llvm/lib/ProfileData/SampleProfWriter.cpp
+++ b/llvm/lib/ProfileData/SampleProfWriter.cpp
@@ -646,8 +646,6 @@ std::error_code SampleProfileWriterExtBinaryBase::writeOneSection(
SecHdrTableEntry &Entry = SectionHdrLayout[LayoutIdx];
// The setting of SecFlagCompress should happen before markSectionStart.
- if (Type == SecProfileSymbolList && ProfSymList && ProfSymList->toCompress())
- setToCompressSection(SecProfileSymbolList);
if (Type == SecFuncMetadata && FunctionSamples::ProfileIsProbeBased)
addSectionFlag(SecFuncMetadata, SecFuncMetadataFlags::SecFlagIsProbeBased);
if (Type == SecFuncMetadata &&
More information about the llvm-commits
mailing list