Skip to content

Commit 230f33b

Browse files
committed
Remove reference to FAM in registerCallbacks and VerifyEach for TargetVerify in instrumentation
1 parent 42b8982 commit 230f33b

File tree

15 files changed

+24
-38
lines changed

15 files changed

+24
-38
lines changed

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
917917
TheModule->getContext(),
918918
(CodeGenOpts.DebugPassManager || DebugPassStructure),
919919
CodeGenOpts.VerifyEach, PrintPassOpts);
920-
SI.registerCallbacks(PIC, &MAM, &FAM);
920+
SI.registerCallbacks(PIC, &MAM);
921921
PassBuilder PB(TM.get(), PTO, PGOOpt, &PIC);
922922

923923
// Handle the assignment tracking feature options.

flang/lib/Frontend/FrontendActions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ void CodeGenAction::runOptimizationPipeline(llvm::raw_pwrite_stream &os) {
947947

948948
llvm::StandardInstrumentations si(llvmModule->getContext(),
949949
opts.DebugPassManager);
950-
si.registerCallbacks(pic, &mam, &fam);
950+
si.registerCallbacks(pic, &mam);
951951
if (ci.isTimingEnabled())
952952
si.getTimePasses().setOutStream(ci.getTimingStreamLLVM());
953953
pto.LoopUnrolling = opts.UnrollLoops;

llvm/examples/Kaleidoscope/Chapter4/toy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ static void InitializeModuleAndManagers() {
577577
ThePIC = std::make_unique<PassInstrumentationCallbacks>();
578578
TheSI = std::make_unique<StandardInstrumentations>(*TheContext,
579579
/*DebugLogging*/ true);
580-
TheSI->registerCallbacks(*ThePIC, TheMAM.get(), TheFAM.get());
580+
TheSI->registerCallbacks(*ThePIC, TheMAM.get());
581581

582582
// Add transform passes.
583583
// Do simple "peephole" optimizations and bit-twiddling optzns.

llvm/examples/Kaleidoscope/Chapter5/toy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ static void InitializeModuleAndManagers() {
851851
ThePIC = std::make_unique<PassInstrumentationCallbacks>();
852852
TheSI = std::make_unique<StandardInstrumentations>(*TheContext,
853853
/*DebugLogging*/ true);
854-
TheSI->registerCallbacks(*ThePIC, TheMAM.get(), TheFAM.get());
854+
TheSI->registerCallbacks(*ThePIC, TheMAM.get());
855855

856856
// Add transform passes.
857857
// Do simple "peephole" optimizations and bit-twiddling optzns.

llvm/examples/Kaleidoscope/Chapter6/toy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ static void InitializeModuleAndManagers() {
970970
ThePIC = std::make_unique<PassInstrumentationCallbacks>();
971971
TheSI = std::make_unique<StandardInstrumentations>(*TheContext,
972972
/*DebugLogging*/ true);
973-
TheSI->registerCallbacks(*ThePIC, TheMAM.get(), TheFAM.get());
973+
TheSI->registerCallbacks(*ThePIC, TheMAM.get());
974974

975975
// Add transform passes.
976976
// Do simple "peephole" optimizations and bit-twiddling optzns.

llvm/examples/Kaleidoscope/Chapter7/toy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ static void InitializeModuleAndManagers() {
11391139
ThePIC = std::make_unique<PassInstrumentationCallbacks>();
11401140
TheSI = std::make_unique<StandardInstrumentations>(*TheContext,
11411141
/*DebugLogging*/ true);
1142-
TheSI->registerCallbacks(*ThePIC, TheMAM.get(), TheFAM.get());
1142+
TheSI->registerCallbacks(*ThePIC, TheMAM.get());
11431143

11441144
// Add transform passes.
11451145
// Promote allocas to registers.

llvm/include/llvm/Passes/StandardInstrumentations.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,7 @@ class VerifyInstrumentation {
478478
public:
479479
VerifyInstrumentation(bool DebugLogging) : DebugLogging(DebugLogging) {}
480480
LLVM_ABI void registerCallbacks(PassInstrumentationCallbacks &PIC,
481-
ModuleAnalysisManager *MAM,
482-
FunctionAnalysisManager *FAM);
481+
ModuleAnalysisManager *MAM);
483482
};
484483

485484
/// This class implements --time-trace functionality for new pass manager.
@@ -625,8 +624,7 @@ class StandardInstrumentations {
625624
// Register all the standard instrumentation callbacks. If \p FAM is nullptr
626625
// then PreservedCFGChecker is not enabled.
627626
LLVM_ABI void registerCallbacks(PassInstrumentationCallbacks &PIC,
628-
ModuleAnalysisManager *MAM,
629-
FunctionAnalysisManager *FAM);
627+
ModuleAnalysisManager *MAM);
630628

631629
TimePassesHandler &getTimePasses() { return TimePasses; }
632630
};

llvm/lib/LTO/LTOBackend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ static void runNewPMPasses(const Config &Conf, Module &Mod, TargetMachine *TM,
273273
PassInstrumentationCallbacks PIC;
274274
StandardInstrumentations SI(Mod.getContext(), Conf.DebugPassManager,
275275
Conf.VerifyEach);
276-
SI.registerCallbacks(PIC, &MAM, &FAM);
276+
SI.registerCallbacks(PIC, &MAM);
277277
PassBuilder PB(TM, Conf.PTO, PGOOpt, &PIC);
278278

279279
RegisterPassPlugins(Conf.PassPlugins, PB);

llvm/lib/LTO/ThinLTOCodeGenerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ static void optimizeModule(Module &TheModule, TargetMachine &TM,
241241

242242
PassInstrumentationCallbacks PIC;
243243
StandardInstrumentations SI(TheModule.getContext(), DebugPassManager);
244-
SI.registerCallbacks(PIC, &MAM, &FAM);
244+
SI.registerCallbacks(PIC, &MAM);
245245
PipelineTuningOptions PTO;
246246
PTO.LoopVectorization = true;
247247
PTO.SLPVectorization = true;

llvm/lib/Passes/PassBuilderBindings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static LLVMErrorRef runPasses(Module *Mod, Function *Fun, const char *Passes,
7676
PB.crossRegisterProxies(LAM, FAM, CGAM, MAM);
7777

7878
StandardInstrumentations SI(Mod->getContext(), Debug, VerifyEach);
79-
SI.registerCallbacks(PIC, &MAM, &FAM);
79+
SI.registerCallbacks(PIC, &MAM);
8080

8181
// Run the pipeline.
8282
if (Fun) {

0 commit comments

Comments
 (0)