[llvm-branch-commits] [llvm] [CodeGen][NewPM] Port machine trace metrics analysis to new pass manager. (PR #108507)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Sep 23 05:09:18 PDT 2024


================
@@ -102,19 +103,22 @@ class MachineTraceMetrics : public MachineFunctionPass {
   TargetSchedModel SchedModel;
 
 public:
+  friend class MachineTraceMetricsWrapperPass;
   friend class Ensemble;
   friend class Trace;
 
   class Ensemble;
 
-  static char ID;
+  // For legacy pass.
+  MachineTraceMetrics() {
+    std::fill(std::begin(Ensembles), std::end(Ensembles), nullptr);
+  }
----------------
arsenm wrote:

So the Ensembles should just get = 0 initializer in the declaration? Should also probably be using unique_ptr 

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


More information about the llvm-branch-commits mailing list