From 9cf0789763e6bb311928451cb2a800be0b4d1040 Mon Sep 17 00:00:00 2001 From: huangjinjie Date: Fri, 21 Mar 2025 19:09:39 +0800 Subject: [PATCH] clean the unused field, and the related loop --- llvm/lib/Transforms/IPO/SampleProfile.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp index 731ee7edb48c8..82d4db12586d7 100644 --- a/llvm/lib/Transforms/IPO/SampleProfile.cpp +++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp @@ -562,12 +562,6 @@ class SampleProfileLoader final : public SampleProfileLoaderBaseImpl { /// used to generate the current profile. std::shared_ptr PSL; - /// Total number of samples collected in this profile. - /// - /// This is the sum of all the samples collected in all the functions executed - /// at runtime. - uint64_t TotalCollectedSamples = 0; - // Information recorded when we declined to inline a call site // because we have determined it is too cold is accumulated for // each callee function. Initially this is just the entry count. @@ -2182,10 +2176,6 @@ bool SampleProfileLoader::runOnModule(Module &M, ModuleAnalysisManager *AM, rejectHighStalenessProfile(M, PSI, Reader->getProfiles())) return false; - // Compute the total number of samples collected in this profile. - for (const auto &I : Reader->getProfiles()) - TotalCollectedSamples += I.second.getTotalSamples(); - auto Remapper = Reader->getRemapper(); // Populate the symbol map. for (const auto &N_F : M.getValueSymbolTable()) {