1 //===- MachineDominanceFrontier.cpp ---------------------------------------===//
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/CodeGen/MachineDominanceFrontier.h"
11 #include "llvm/Analysis/DominanceFrontierImpl.h"
12 #include "llvm/CodeGen/MachineDominators.h"
13 #include "llvm/CodeGen/Passes.h"
18 template class DominanceFrontierBase<MachineBasicBlock>;
19 template class ForwardDominanceFrontierBase<MachineBasicBlock>;
23 char MachineDominanceFrontier::ID = 0;
25 INITIALIZE_PASS_BEGIN(MachineDominanceFrontier, "machine-domfrontier",
26 "Machine Dominance Frontier Construction", true, true)
27 INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
28 INITIALIZE_PASS_END(MachineDominanceFrontier, "machine-domfrontier",
29 "Machine Dominance Frontier Construction", true, true)
31 MachineDominanceFrontier::MachineDominanceFrontier()
32 : MachineFunctionPass(ID),
34 initializeMachineDominanceFrontierPass(*PassRegistry::getPassRegistry());
37 char &llvm::MachineDominanceFrontierID = MachineDominanceFrontier::ID;
39 bool MachineDominanceFrontier::runOnMachineFunction(MachineFunction &) {
41 Base.analyze(getAnalysis<MachineDominatorTree>().getBase());
45 void MachineDominanceFrontier::releaseMemory() {
49 void MachineDominanceFrontier::getAnalysisUsage(AnalysisUsage &AU) const {
51 AU.addRequired<MachineDominatorTree>();
52 MachineFunctionPass::getAnalysisUsage(AU);