Skip to content

Commit 8e8d048

Browse files
committed
SampleProfileProbe: Remove unused field.
1 parent 8fe5ac8 commit 8e8d048

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class PseudoProbeVerifier {
7474
class SampleProfileProber {
7575
public:
7676
// Give an empty module id when the prober is not used for instrumentation.
77-
SampleProfileProber(Function &F, const std::string &CurModuleUniqueId);
77+
SampleProfileProber(Function &F);
7878
void instrumentOneFunc(Function &F, TargetMachine *TM);
7979

8080
private:

llvm/lib/Transforms/IPO/SampleProfileProbe.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,7 @@ void PseudoProbeVerifier::verifyProbeFactors(
168168
}
169169
}
170170

171-
SampleProfileProber::SampleProfileProber(Function &Func,
172-
const std::string &CurModuleUniqueId)
173-
: F(&Func), CurModuleUniqueId(CurModuleUniqueId) {
171+
SampleProfileProber::SampleProfileProber(Function &Func) : F(&Func) {
174172
BlockProbeIds.clear();
175173
CallProbeIds.clear();
176174
LastProbeId = (uint32_t)PseudoProbeReservedId::Last;
@@ -452,7 +450,6 @@ void SampleProfileProber::instrumentOneFunc(Function &F, TargetMachine *TM) {
452450

453451
PreservedAnalyses SampleProfileProbePass::run(Module &M,
454452
ModuleAnalysisManager &AM) {
455-
auto ModuleId = getUniqueModuleId(&M);
456453
// Create the pseudo probe desc metadata beforehand.
457454
// Note that modules with only data but no functions will require this to
458455
// be set up so that they will be known as probed later.
@@ -461,7 +458,7 @@ PreservedAnalyses SampleProfileProbePass::run(Module &M,
461458
for (auto &F : M) {
462459
if (F.isDeclaration())
463460
continue;
464-
SampleProfileProber ProbeManager(F, ModuleId);
461+
SampleProfileProber ProbeManager(F);
465462
ProbeManager.instrumentOneFunc(F, TM);
466463
}
467464

0 commit comments

Comments
 (0)