[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
Fri Sep 13 01:17:28 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:

This is odd to split the constructors, do it in init? 

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


More information about the llvm-branch-commits mailing list