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

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 19 03:54:19 PDT 2018


fedor.sergeev added inline comments.


================
Comment at: unittests/IR/PassBuilderCallbacksTest.cpp:324-330
+  void registerPassInstrumentation() {
+    Callbacks.registerBeforePassCallback([this](StringRef P, llvm::Any IR) {
+      return this->runBeforePass(P, IR);
+    });
+    Callbacks.registerAfterPassCallback(
+        [this](StringRef P, llvm::Any IR) { this->runAfterPass(P, IR); });
+  }
----------------
chandlerc wrote:
> Do you just want to do this in the constructor?
No, I dont.
I want to skip registering any callbacks in tests that do not explicitly enable pass instrumentation.


Repository:
  rL LLVM

https://reviews.llvm.org/D47858





More information about the llvm-commits mailing list