1 //===- DominanceFrontier.cpp - Dominance Frontier 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 #include "llvm/Analysis/DominanceFrontier.h"
11 #include "llvm/Analysis/DominanceFrontierImpl.h"
16 template class DominanceFrontierBase<BasicBlock>;
17 template class ForwardDominanceFrontierBase<BasicBlock>;
20 char DominanceFrontier::ID = 0;
22 INITIALIZE_PASS_BEGIN(DominanceFrontier, "domfrontier",
23 "Dominance Frontier Construction", true, true)
24 INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
25 INITIALIZE_PASS_END(DominanceFrontier, "domfrontier",
26 "Dominance Frontier Construction", true, true)
28 DominanceFrontier::DominanceFrontier()
31 initializeDominanceFrontierPass(*PassRegistry::getPassRegistry());
34 void DominanceFrontier::releaseMemory() {
38 bool DominanceFrontier::runOnFunction(Function &) {
40 Base.analyze(getAnalysis<DominatorTreeWrapperPass>().getDomTree());
44 void DominanceFrontier::getAnalysisUsage(AnalysisUsage &AU) const {
46 AU.addRequired<DominatorTreeWrapperPass>();
49 void DominanceFrontier::print(raw_ostream &OS, const Module *) const {
53 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
54 void DominanceFrontier::dump() const {