[PATCH] D90545: [NewPM] Don't run before pass instrumentation on required passes
    Nikita Popov via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Nov  4 00:46:53 PST 2020
    
    
  
nikic added inline comments.
================
Comment at: llvm/include/llvm/IR/PassInstrumentation.h:186
+    if (!isRequired(Pass)) {
+      for (auto &C : Callbacks->BeforePassCallbacks)
+        ShouldRun &= C(Pass.name(), llvm::Any(&IR));
----------------
asbirlea wrote:
> Could you add a doxygen comment that the `BeforePassCallbacks` are only called if the pass is not required around the declaration of `BeforePassCallbacks`? 
> Would be useful to have comments on each of the vectors of callbacks.
Maybe also rename it to `BeforeRequiredPassCallbacks`?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90545/new/
https://reviews.llvm.org/D90545
    
    
More information about the llvm-commits
mailing list