diff options
author | Dan Gohman <gohman@apple.com> | 2009-01-05 17:59:02 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-01-05 17:59:02 +0000 |
commit | 906152a20f68a942f64a27bf31e5c5232b444e8f (patch) | |
tree | d9a5b5a13544e6f9abdc20d28878386191a95d72 /llvm/lib/CodeGen/MachineDominators.cpp | |
parent | 1e03f7f19e08699e1c449e311133ae1748e1c489 (diff) | |
download | llvm-906152a20f68a942f64a27bf31e5c5232b444e8f.zip llvm-906152a20f68a942f64a27bf31e5c5232b444e8f.tar.gz llvm-906152a20f68a942f64a27bf31e5c5232b444e8f.tar.bz2 |
Tidy up #includes, deleting a bunch of unnecessary #includes.
llvm-svn: 61715
Diffstat (limited to 'llvm/lib/CodeGen/MachineDominators.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineDominators.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineDominators.cpp b/llvm/lib/CodeGen/MachineDominators.cpp index 8f67993..f782048 100644 --- a/llvm/lib/CodeGen/MachineDominators.cpp +++ b/llvm/lib/CodeGen/MachineDominators.cpp @@ -26,3 +26,28 @@ static RegisterPass<MachineDominatorTree> E("machinedomtree", "MachineDominator Tree Construction", true); const PassInfo *const llvm::MachineDominatorsID = &E; + +void MachineDominatorTree::getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + MachineFunctionPass::getAnalysisUsage(AU); +} + +bool MachineDominatorTree::runOnMachineFunction(MachineFunction &F) { + DT->recalculate(F); + + return false; +} + +MachineDominatorTree::MachineDominatorTree() + : MachineFunctionPass(intptr_t(&ID)) { + DT = new DominatorTreeBase<MachineBasicBlock>(false); +} + +MachineDominatorTree::~MachineDominatorTree() { + DT->releaseMemory(); + delete DT; +} + +void MachineDominatorTree::releaseMemory() { + DT->releaseMemory(); +} |