[llvm-branch-commits] [llvm] [CodeGen][NewPM] Port machine trace metrics analysis to new pass manager. (PR #108507)
Christudasan Devadasan via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Sep 13 00:54:26 PDT 2024
================
@@ -39,41 +39,68 @@ using namespace llvm;
#define DEBUG_TYPE "machine-trace-metrics"
-char MachineTraceMetrics::ID = 0;
+AnalysisKey MachineTraceMetricsAnalysis::Key;
-char &llvm::MachineTraceMetricsID = MachineTraceMetrics::ID;
+MachineTraceMetricsAnalysis::Result
+MachineTraceMetricsAnalysis::run(MachineFunction &MF,
+ MachineFunctionAnalysisManager &MFAM) {
+ return Result(MF, MFAM.getResult<MachineLoopAnalysis>(MF));
+}
+
+PreservedAnalyses
+MachineTraceMetricsVerifierPass::run(MachineFunction &MF,
+ MachineFunctionAnalysisManager &MFAM) {
+ MFAM.getResult<MachineTraceMetricsAnalysis>(MF).verifyAnalysis();
----------------
cdevadas wrote:
In the NPM infrastructure verifyAnalysis is done separately. There are many such instances in the opt pipeline. This is the first attempt to port CodeGen analysis with verify.
https://github.com/llvm/llvm-project/pull/108507
More information about the llvm-branch-commits
mailing list