summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorFedor Sergeev <fedor.sergeev@azul.com>2019-03-31 10:15:39 +0000
committerFedor Sergeev <fedor.sergeev@azul.com>2019-03-31 10:15:39 +0000
commita2ed448bf24fe22e9a1149c6fcb583c139079b22 (patch)
treed8324272fa42ed9d728c16e2396d33401514ab0c /llvm/lib/IR
parent7c67dbdc65fed2eec142c68a154ff502b68b0d05 (diff)
downloadbcm5719-llvm-a2ed448bf24fe22e9a1149c6fcb583c139079b22.tar.gz
bcm5719-llvm-a2ed448bf24fe22e9a1149c6fcb583c139079b22.zip
SafepointIRVerifier port to new Pass Manager
Straightforward port of StatepointIRVerifier pass to new Pass Manager framework. Fix By: skatkov Reviewed By: fedor.sergeev Differential Revision: https://reviews.llvm.org/D59825 This is a re-land of r357147/r357148 with LLVM_ENABLE_MODULES build fixed. Adding IR/SafepointIRVerifier.h into its own module. llvm-svn: 357361
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/SafepointIRVerifier.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/IR/SafepointIRVerifier.cpp b/llvm/lib/IR/SafepointIRVerifier.cpp
index 217f10e864d..7f3dea5e6a6 100644
--- a/llvm/lib/IR/SafepointIRVerifier.cpp
+++ b/llvm/lib/IR/SafepointIRVerifier.cpp
@@ -197,6 +197,17 @@ protected:
static void Verify(const Function &F, const DominatorTree &DT,
const CFGDeadness &CD);
+namespace llvm {
+PreservedAnalyses SafepointIRVerifierPass::run(Function &F,
+ FunctionAnalysisManager &AM) {
+ const auto &DT = AM.getResult<DominatorTreeAnalysis>(F);
+ CFGDeadness CD;
+ CD.processFunction(F, DT);
+ Verify(F, DT, CD);
+ return PreservedAnalyses::all();
+}
+}
+
namespace {
struct SafepointIRVerifier : public FunctionPass {
OpenPOWER on IntegriCloud