[llvm] 8e8d048 - SampleProfileProbe: Remove unused field.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 14 16:48:10 PDT 2025


Author: Peter Collingbourne
Date: 2025-04-14T16:47:36-07:00
New Revision: 8e8d04870dbc3248301534796b4370f75e33f7c0

URL: https://github.com/llvm/llvm-project/commit/8e8d04870dbc3248301534796b4370f75e33f7c0
DIFF: https://github.com/llvm/llvm-project/commit/8e8d04870dbc3248301534796b4370f75e33f7c0.diff

LOG: SampleProfileProbe: Remove unused field.

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h
    llvm/lib/Transforms/IPO/SampleProfileProbe.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h b/llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h
index b52ef847d9db6..2a47581f1ad9f 100644
--- a/llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h
+++ b/llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h
@@ -74,7 +74,7 @@ class PseudoProbeVerifier {
 class SampleProfileProber {
 public:
   // Give an empty module id when the prober is not used for instrumentation.
-  SampleProfileProber(Function &F, const std::string &CurModuleUniqueId);
+  SampleProfileProber(Function &F);
   void instrumentOneFunc(Function &F, TargetMachine *TM);
 
 private:

diff  --git a/llvm/lib/Transforms/IPO/SampleProfileProbe.cpp b/llvm/lib/Transforms/IPO/SampleProfileProbe.cpp
index e15aa0472088c..16f209039a04a 100644
--- a/llvm/lib/Transforms/IPO/SampleProfileProbe.cpp
+++ b/llvm/lib/Transforms/IPO/SampleProfileProbe.cpp
@@ -168,9 +168,7 @@ void PseudoProbeVerifier::verifyProbeFactors(
   }
 }
 
-SampleProfileProber::SampleProfileProber(Function &Func,
-                                         const std::string &CurModuleUniqueId)
-    : F(&Func), CurModuleUniqueId(CurModuleUniqueId) {
+SampleProfileProber::SampleProfileProber(Function &Func) : F(&Func) {
   BlockProbeIds.clear();
   CallProbeIds.clear();
   LastProbeId = (uint32_t)PseudoProbeReservedId::Last;
@@ -452,7 +450,6 @@ void SampleProfileProber::instrumentOneFunc(Function &F, TargetMachine *TM) {
 
 PreservedAnalyses SampleProfileProbePass::run(Module &M,
                                               ModuleAnalysisManager &AM) {
-  auto ModuleId = getUniqueModuleId(&M);
   // Create the pseudo probe desc metadata beforehand.
   // Note that modules with only data but no functions will require this to
   // be set up so that they will be known as probed later.
@@ -461,7 +458,7 @@ PreservedAnalyses SampleProfileProbePass::run(Module &M,
   for (auto &F : M) {
     if (F.isDeclaration())
       continue;
-    SampleProfileProber ProbeManager(F, ModuleId);
+    SampleProfileProber ProbeManager(F);
     ProbeManager.instrumentOneFunc(F, TM);
   }
 


        


More information about the llvm-commits mailing list