summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/MachineDominators.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-01-05 17:59:02 +0000
committerDan Gohman <gohman@apple.com>2009-01-05 17:59:02 +0000
commitd68a07650cdb2e18f18f362ba533459aa10e01b6 (patch)
tree0b0b5b402393260240d66dd4889d094b41a2ee82 /lib/CodeGen/MachineDominators.cpp
parent08f053f5d1df120dc8389a3ec8947ab16b1ccc53 (diff)
downloadexternal_llvm-d68a07650cdb2e18f18f362ba533459aa10e01b6.zip
external_llvm-d68a07650cdb2e18f18f362ba533459aa10e01b6.tar.gz
external_llvm-d68a07650cdb2e18f18f362ba533459aa10e01b6.tar.bz2
Tidy up #includes, deleting a bunch of unnecessary #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61715 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineDominators.cpp')
-rw-r--r--lib/CodeGen/MachineDominators.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineDominators.cpp b/lib/CodeGen/MachineDominators.cpp
index 8f67993..f782048 100644
--- a/lib/CodeGen/MachineDominators.cpp
+++ b/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();
+}