[llvm] Remove unused variable (PR #88223)

Lei Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 19:12:08 PDT 2024


https://github.com/wlei-llvm created https://github.com/llvm/llvm-project/pull/88223

fix the CI

>From a297a449569d71b8c9f6ff6916592d84fbe361bd Mon Sep 17 00:00:00 2001
From: wlei <wlei at fb.com>
Date: Tue, 9 Apr 2024 19:06:41 -0700
Subject: [PATCH] Remove unused variable

---
 .../llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h      | 5 +----
 llvm/lib/Transforms/IPO/SampleProfile.cpp                    | 2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h b/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
index 39295d6d81b8f9..7c725a3c1216cb 100644
--- a/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
+++ b/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
@@ -86,12 +86,9 @@ template <> struct IRTraits<BasicBlock> {
 // SampleProfileProber.
 class PseudoProbeManager {
   DenseMap<uint64_t, PseudoProbeDescriptor> GUIDToProbeDescMap;
-  const ThinOrFullLTOPhase LTOPhase;
 
 public:
-  PseudoProbeManager(const Module &M,
-                     ThinOrFullLTOPhase LTOPhase = ThinOrFullLTOPhase::None)
-      : LTOPhase(LTOPhase) {
+  PseudoProbeManager(const Module &M) {
     if (NamedMDNode *FuncInfo =
             M.getNamedMetadata(PseudoProbeDescMetadataName)) {
       for (const auto *Operand : FuncInfo->operands()) {
diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp
index b5f45a252c7b46..0b3a6931e779b6 100644
--- a/llvm/lib/Transforms/IPO/SampleProfile.cpp
+++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp
@@ -2059,7 +2059,7 @@ bool SampleProfileLoader::doInitialization(Module &M,
 
   // Load pseudo probe descriptors for probe-based function samples.
   if (Reader->profileIsProbeBased()) {
-    ProbeManager = std::make_unique<PseudoProbeManager>(M, LTOPhase);
+    ProbeManager = std::make_unique<PseudoProbeManager>(M);
     if (!ProbeManager->moduleIsProbed(M)) {
       const char *Msg =
           "Pseudo-probe-based profile requires SampleProfileProbePass";



More information about the llvm-commits mailing list