diff --git a/llvm/include/llvm/CodeGen/MachineDominators.h b/llvm/include/llvm/CodeGen/MachineDominators.h index 00bfa1a269456..f749e9ff7e0ab 100644 --- a/llvm/include/llvm/CodeGen/MachineDominators.h +++ b/llvm/include/llvm/CodeGen/MachineDominators.h @@ -36,6 +36,7 @@ extern template class DomTreeNodeBase; extern template class DominatorTreeBase; // DomTree extern template class DominatorTreeBase; // PostDomTree +using MachineDomTree = DomTreeBase; using MachineDomTreeNode = DomTreeNodeBase; //===------------------------------------- @@ -43,8 +44,6 @@ using MachineDomTreeNode = DomTreeNodeBase; /// compute a normal dominator tree. /// class MachineDominatorTree : public MachineFunctionPass { - using DomTreeT = DomTreeBase; - /// Helper structure used to hold all the basic blocks /// involved in the split of a critical edge. struct CriticalEdge { @@ -67,7 +66,7 @@ class MachineDominatorTree : public MachineFunctionPass { mutable SmallSet NewBBs; /// The DominatorTreeBase that is used to compute a normal dominator tree. - std::unique_ptr DT; + std::unique_ptr DT; /// Apply all the recorded critical edges to the DT. /// This updates the underlying DT information in a way that uses @@ -84,8 +83,9 @@ class MachineDominatorTree : public MachineFunctionPass { calculate(MF); } - DomTreeT &getBase() { - if (!DT) DT.reset(new DomTreeT()); + MachineDomTree &getBase() { + if (!DT) + DT.reset(new MachineDomTree()); applySplitCriticalEdges(); return *DT; } diff --git a/llvm/lib/CodeGen/MachineDominators.cpp b/llvm/lib/CodeGen/MachineDominators.cpp index c8845d8382826..28cff2a4f3f3a 100644 --- a/llvm/lib/CodeGen/MachineDominators.cpp +++ b/llvm/lib/CodeGen/MachineDominators.cpp @@ -73,7 +73,7 @@ void MachineDominatorTree::releaseMemory() { void MachineDominatorTree::verifyAnalysis() const { if (DT && VerifyMachineDomInfo) - if (!DT->verify(DomTreeT::VerificationLevel::Basic)) { + if (!DT->verify(MachineDomTree::VerificationLevel::Basic)) { errs() << "MachineDominatorTree verification failed\n"; abort(); }