1 //===- PostDominators.cpp - Post-Dominator Calculation --------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements the post-dominator construction algorithms.
12 //===----------------------------------------------------------------------===//
14 #include "llvm/Analysis/PostDominators.h"
15 #include "llvm/ADT/DepthFirstIterator.h"
16 #include "llvm/ADT/SetOperations.h"
17 #include "llvm/IR/CFG.h"
18 #include "llvm/IR/Instructions.h"
19 #include "llvm/Support/Debug.h"
20 #include "llvm/Support/GenericDomTreeConstruction.h"
23 #define DEBUG_TYPE "postdomtree"
25 //===----------------------------------------------------------------------===//
26 // PostDominatorTree Implementation
27 //===----------------------------------------------------------------------===//
29 char PostDominatorTree::ID = 0;
30 INITIALIZE_PASS(PostDominatorTree, "postdomtree",
31 "Post-Dominator Tree Construction", true, true)
33 bool PostDominatorTree::runOnFunction(Function &F) {
38 PostDominatorTree::~PostDominatorTree() {
42 void PostDominatorTree::print(raw_ostream &OS, const Module *) const {
47 FunctionPass* llvm::createPostDomTree() {
48 return new PostDominatorTree();