llvm.org GIT mirror llvm / release_35@215010 lib / Analysis / PostDominators.cpp
release_35@215010

Tree @release_35@215010 (Download .tar.gz)

PostDominators.cpp @release_35@215010

4c9df7c
2b37d7c
b576c94
 
4ee451d
 
2b37d7c
b576c94
1715229
4c9df7c
1715229
 
 
a69fd90
551ccae
 
03e36d7
0b8c9a8
d04a8d4
1decd56
cd7c287
d0fde30
4da2537
 
94108ab
3dc6776
442b32b
 
1997473
d13db2c
ce665bd
442b32b
471ab54
d20cc14
471ab54
 
 
791102f
f605580
 
 
45cfe54
 
791102f
 
 
5771d6c
 
 
 
//===- PostDominators.cpp - Post-Dominator Calculation --------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file implements the post-dominator construction algorithms.
//
//===----------------------------------------------------------------------===//

#include "llvm/Analysis/PostDominators.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/Instructions.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/GenericDomTreeConstruction.h"
using namespace llvm;

#define DEBUG_TYPE "postdomtree"

//===----------------------------------------------------------------------===//
//  PostDominatorTree Implementation
//===----------------------------------------------------------------------===//

char PostDominatorTree::ID = 0;
INITIALIZE_PASS(PostDominatorTree, "postdomtree",
                "Post-Dominator Tree Construction", true, true)

bool PostDominatorTree::runOnFunction(Function &F) {
  DT->recalculate(F);
  return false;
}

PostDominatorTree::~PostDominatorTree() {
  delete DT;
}

void PostDominatorTree::print(raw_ostream &OS, const Module *) const {
  DT->print(OS);
}


FunctionPass* llvm::createPostDomTree() {
  return new PostDominatorTree();
}