summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/PostDominators.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-18 20:10:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-18 20:10:56 +0000
commit044eb2f6afba375a914ac9d8024f8f5142bb912e (patch)
tree1475247dc9f9fe5be155ebd4c9069c75aadf8c20 /include/llvm/Analysis/PostDominators.h
parenteb70dddbd77e120e5d490bd8fbe7ff3f8fa81c6b (diff)
Notes
Diffstat (limited to 'include/llvm/Analysis/PostDominators.h')
-rw-r--r--include/llvm/Analysis/PostDominators.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/include/llvm/Analysis/PostDominators.h b/include/llvm/Analysis/PostDominators.h
index 17f2e8eaf4a25..381e65539c4e7 100644
--- a/include/llvm/Analysis/PostDominators.h
+++ b/include/llvm/Analysis/PostDominators.h
@@ -1,4 +1,4 @@
-//=- llvm/Analysis/PostDominators.h - Post Dominator Calculation-*- C++ -*-===//
+//=- llvm/Analysis/PostDominators.h - Post Dominator Calculation --*- C++ -*-=//
//
// The LLVM Compiler Infrastructure
//
@@ -14,16 +14,20 @@
#ifndef LLVM_ANALYSIS_POSTDOMINATORS_H
#define LLVM_ANALYSIS_POSTDOMINATORS_H
+#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/PassManager.h"
+#include "llvm/Pass.h"
namespace llvm {
+class Function;
+class raw_ostream;
+
/// PostDominatorTree Class - Concrete subclass of DominatorTree that is used to
/// compute the post-dominator tree.
-///
struct PostDominatorTree : public PostDomTreeBase<BasicBlock> {
- typedef PostDomTreeBase<BasicBlock> Base;
+ using Base = PostDomTreeBase<BasicBlock>;
/// Handle invalidation explicitly.
bool invalidate(Function &F, const PreservedAnalyses &PA,
@@ -34,11 +38,12 @@ struct PostDominatorTree : public PostDomTreeBase<BasicBlock> {
class PostDominatorTreeAnalysis
: public AnalysisInfoMixin<PostDominatorTreeAnalysis> {
friend AnalysisInfoMixin<PostDominatorTreeAnalysis>;
+
static AnalysisKey Key;
public:
- /// \brief Provide the result typedef for this analysis pass.
- typedef PostDominatorTree Result;
+ /// \brief Provide the result type for this analysis pass.
+ using Result = PostDominatorTree;
/// \brief Run the analysis pass over a function and produce a post dominator
/// tree.
@@ -52,11 +57,13 @@ class PostDominatorTreePrinterPass
public:
explicit PostDominatorTreePrinterPass(raw_ostream &OS);
+
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
};
struct PostDominatorTreeWrapperPass : public FunctionPass {
static char ID; // Pass identification, replacement for typeid
+
PostDominatorTree DT;
PostDominatorTreeWrapperPass() : FunctionPass(ID) {
@@ -99,6 +106,6 @@ template <> struct GraphTraits<PostDominatorTree*>
}
};
-} // End llvm namespace
+} // end namespace llvm
-#endif
+#endif // LLVM_ANALYSIS_POSTDOMINATORS_H