[PATCH] D83519: [NewPM] Support optnone under new pass manager

Yuanfang Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 9 17:11:19 PDT 2020


ychen added inline comments.


================
Comment at: llvm/include/llvm/IR/PassInstrumentation.h:150
     for (auto &C : Callbacks->BeforePassCallbacks)
-      ShouldRun &= C(Pass.name(), llvm::Any(&IR));
+      ShouldRun &= C(Pass.name(), Pass.isRequired(), llvm::Any(&IR));
     return ShouldRun;
----------------
Could we do this to not changing the callback API?
`ShouldRun &= C(Pass.name(), llvm::Any(&IR)) || Pass.isRequired();`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83519/new/

https://reviews.llvm.org/D83519





More information about the cfe-commits mailing list