[PATCH] D47858: [New PM] Introducing PassInstrumentation framework

Philip Pfaffe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 14 06:03:33 PDT 2018


philip.pfaffe added a comment.

This is looking great. Apart from two things that aren't needed anymore, the last point of discussion is `getPassInstrumentation`. `PassInstrumentationAnalysis` shouldn't be a special citizen. What about making this a free function instead? In fact, why not make this a generic helper e.g. in the `detail` namespace to query _any_ analysis result from a template pass?



================
Comment at: include/llvm/IR/PassInstrumentation.h:70
+/// that need to track pass execution.
+class PassExecutionCounter {
+  unsigned count = 0;
----------------
Is this still required?


================
Comment at: include/llvm/IR/PassInstrumentation.h:146
+      : Callbacks(CB) {}
+  PassInstrumentation(const PassInstrumentation &) = default;
+
----------------
Is this necessary?


================
Comment at: include/llvm/IR/PassManagerInternal.h:89
+
+  PassInstancePtr getPassInstance() const override { return &Pass; }
 
----------------
Is this still required?


Repository:
  rL LLVM

https://reviews.llvm.org/D47858





More information about the llvm-commits mailing list