LLVM  3.7.0
PostDominators.cpp
Go to the documentation of this file.
1 //===- PostDominators.cpp - Post-Dominator Calculation --------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements the post-dominator construction algorithms.
11 //
12 //===----------------------------------------------------------------------===//
13 
16 #include "llvm/ADT/SetOperations.h"
17 #include "llvm/IR/CFG.h"
18 #include "llvm/IR/Instructions.h"
19 #include "llvm/Support/Debug.h"
21 using namespace llvm;
22 
23 #define DEBUG_TYPE "postdomtree"
24 
25 //===----------------------------------------------------------------------===//
26 // PostDominatorTree Implementation
27 //===----------------------------------------------------------------------===//
28 
29 char PostDominatorTree::ID = 0;
31  "Post-Dominator Tree Construction", true, true)
32 
33 bool PostDominatorTree::runOnFunction(Function &F) {
34  DT->recalculate(F);
35  return false;
36 }
37 
39  delete DT;
40 }
41 
42 void PostDominatorTree::print(raw_ostream &OS, const Module *) const {
43  DT->print(OS);
44 }
45 
46 
48  return new PostDominatorTree();
49 }
50 
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:114
F(f)
DominatorTreeBase< BasicBlock > * DT
void print(raw_ostream &OS, const Module *) const override
print - Print out the internal state of the pass.
INITIALIZE_PASS(PostDominatorTree,"postdomtree","Post-Dominator Tree Construction", true, true) bool PostDominatorTree
FunctionPass class - This class is used to implement most global optimizations.
Definition: Pass.h:294
Generic dominator tree construction - This file provides routines to construct immediate dominator in...
PostDominatorTree Class - Concrete subclass of DominatorTree that is used to compute the post-dominat...
void print(raw_ostream &o) const
print - Convert to human readable form
FunctionPass * createPostDomTree()
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:38