diff options
author | Hongbin Zheng <etherzhhb@gmail.com> | 2016-02-25 16:45:53 +0000 |
---|---|---|
committer | Hongbin Zheng <etherzhhb@gmail.com> | 2016-02-25 16:45:53 +0000 |
commit | 66b19fbc4e8fda0aa7489ff1bcbc7d0b0f19a8fb (patch) | |
tree | ccba68cc3d7806812d54c54987229c1a36750330 /llvm/lib/Analysis/PostDominators.cpp | |
parent | ad782ce3f7e282a818ad062ba3c18c96b7e742b5 (diff) | |
download | llvm-66b19fbc4e8fda0aa7489ff1bcbc7d0b0f19a8fb.zip llvm-66b19fbc4e8fda0aa7489ff1bcbc7d0b0f19a8fb.tar.gz llvm-66b19fbc4e8fda0aa7489ff1bcbc7d0b0f19a8fb.tar.bz2 |
Revert "Introduce analysis pass to compute PostDominators in the new pass manager. NFC"
This reverts commit a3e5cc6a51ab5ad88d1760c63284294a4e34c018.
llvm-svn: 261891
Diffstat (limited to 'llvm/lib/Analysis/PostDominators.cpp')
-rw-r--r-- | llvm/lib/Analysis/PostDominators.cpp | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/llvm/lib/Analysis/PostDominators.cpp b/llvm/lib/Analysis/PostDominators.cpp index b515108..6d92909 100644 --- a/llvm/lib/Analysis/PostDominators.cpp +++ b/llvm/lib/Analysis/PostDominators.cpp @@ -16,7 +16,6 @@ #include "llvm/ADT/SetOperations.h" #include "llvm/IR/CFG.h" #include "llvm/IR/Instructions.h" -#include "llvm/IR/PassManager.h" #include "llvm/Support/Debug.h" #include "llvm/Support/GenericDomTreeConstruction.h" using namespace llvm; @@ -27,38 +26,25 @@ using namespace llvm; // PostDominatorTree Implementation //===----------------------------------------------------------------------===// -char PostDominatorTreeWrapperPass::ID = 0; -INITIALIZE_PASS(PostDominatorTreeWrapperPass, "postdomtree", +char PostDominatorTree::ID = 0; +INITIALIZE_PASS(PostDominatorTree, "postdomtree", "Post-Dominator Tree Construction", true, true) -bool PostDominatorTreeWrapperPass::runOnFunction(Function &F) { - DT.recalculate(F); +bool PostDominatorTree::runOnFunction(Function &F) { + DT->recalculate(F); return false; } -void PostDominatorTreeWrapperPass::print(raw_ostream &OS, const Module *) const { - DT.print(OS); +PostDominatorTree::~PostDominatorTree() { + delete DT; } -FunctionPass* llvm::createPostDomTree() { - return new PostDominatorTreeWrapperPass(); +void PostDominatorTree::print(raw_ostream &OS, const Module *) const { + DT->print(OS); } -char PostDominatorTreeAnalysis::PassID; -PostDominatorTree PostDominatorTreeAnalysis::run(Function &F) { - PostDominatorTree PDT; - PDT.recalculate(F); - return PDT; +FunctionPass* llvm::createPostDomTree() { + return new PostDominatorTree(); } -PostDominatorTreePrinterPass::PostDominatorTreePrinterPass(raw_ostream &OS) - : OS(OS) {} - -PreservedAnalyses -PostDominatorTreePrinterPass::run(Function &F, FunctionAnalysisManager *AM) { - OS << "PostDominatorTree for function: " << F.getName() << "\n"; - AM->getResult<PostDominatorTreeAnalysis>(F).print(OS); - - return PreservedAnalyses::all(); -} |