Straightforward port of StatepointIRVerifier pass to new Pass Manager framework.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Please, update verify-safepoint tests to use new-pass-manager flavor.
include/llvm/IR/SafepointIRVerifier.h | ||
---|---|---|
41 ↗ | (On Diff #192287) | Why do we need Module wrapper for this? |
lib/Passes/PassRegistry.def | ||
220 ↗ | (On Diff #192287) | Just a few lines below there are a handful of verifiers. Lets do this as "verify<safepoint-ir>" (and move it down there) |
include/llvm/IR/SafepointIRVerifier.h | ||
---|---|---|
41 ↗ | (On Diff #192287) | This is done to similarity to VerifierPass which implements both Module and Function pass functionality. I agree that this pass does not do any verification on Module level but I do not see any issues with keeping both wrappers. |
lib/Passes/PassRegistry.def | ||
220 ↗ | (On Diff #192287) | I preferred to keep the same name as Legacy pass manager used. |
include/llvm/IR/SafepointIRVerifier.h | ||
---|---|---|
41 ↗ | (On Diff #192287) | There is no need for additional wrapper. -passes='verify<safepoint-ir>' So from usability point of view there is no utility in adding this wrapper. VerifierPass calls verifyModule for Module version and verifyFunction for Function version, so its not just a wrapper. |
Unfortunately this has introduced a cyclic dependency in the module build graph. Could you please revert the patch to get the bots running again until we figured out a solution?
In file included from <module-includes>:21: /Users/buildslave/jenkins/workspace/lldb-cmake/llvm/include/llvm/IR/SafepointIRVerifier.h:21:10: fatal error: cyclic dependency in module 'LLVM_intrinsic_gen': LLVM_intrinsic_gen -> LLVM_IR -> LLVM_intrinsic_gen #include "llvm/IR/PassManager.h" ^ While building module 'LLVM_intrinsic_gen' imported from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm/lib/IR/Attributes.cpp:15: In file included from <module-includes>:1: /Users/buildslave/jenkins/workspace/lldb-cmake/llvm/include/llvm/IR/Argument.h:19:10: fatal error: could not build module 'LLVM_IR' #include "llvm/IR/Value.h" ~~~~~~~~^~~~~~~~~~~~~~~~~ /Users/buildslave/jenkins/workspace/lldb-cmake/llvm/lib/IR/Attributes.cpp:15:10: fatal error: could not build module 'LLVM_intrinsic_gen' #include "llvm/IR/Attributes.h" ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ 3 errors generated.
NB: not the patch in this review, but the follow-up patch:
Author: Serguei Katkov <serguei.katkov@azul.com> Date: Thu Mar 28 07:02:00 2019 +0000 SafepointIRVerifier port to new Pass Manager Add missed include. llvm-svn: 357148 diff --git a/llvm/include/llvm/IR/SafepointIRVerifier.h b/llvm/include/llvm/IR/SafepointIRVerifier.h index 2a13bcc92a7..ec5527954ad 100644 --- a/llvm/include/llvm/IR/SafepointIRVerifier.h +++ b/llvm/include/llvm/IR/SafepointIRVerifier.h @@ -18,6 +18,8 @@ #ifndef LLVM_IR_SAFEPOINT_IR_VERIFIER #define LLVM_IR_SAFEPOINT_IR_VERIFIER +#include "llvm/IR/PassManager.h" + namespace llvm { class Function;
I reverted the commit in r357201. Let me know if you need any help resolving the cyclic dependency. (You can reproduce it by cmake-ing with -DLLVM_ENABLE_MODULES=1.)
Thank you for reverting the patch, I'll take a look into this dependency. I'll ping you if I have a trouble in reproducing the crash.