[llvm] [NewPM][Instrumentation] Support `MachineOptimizationRemarkEmitter` (PR #90563)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 14:15:16 PDT 2024


================
@@ -2493,6 +2551,79 @@ void PrintCrashIRInstrumentation::registerCallbacks(
       });
 }
 
+void InstrCountChangedReporter::registerCallbacks(
+    PassInstrumentationCallbacks &PIC, ModuleAnalysisManager &MAM) {
+  PIC.registerBeforeNonSkippedPassCallback([this, &MAM, Registered = false](
----------------
aeubanks wrote:

`Module::shouldEmitInstrCountChangedRemark()` calls `getContext().getDiagHandlerPtr()->isAnalysisRemarkEnabled("size-info")`, we should probably do something similar and call `Context.getDiagHandlerPtr()->isAnalysisRemarkEnabled("size-info")`

https://github.com/llvm/llvm-project/pull/90563


More information about the llvm-commits mailing list