diff --git a/include/llvm/Support/GenericDomTree.h b/include/llvm/Support/GenericDomTree.h index 6bc4b4425e7..12a1f5d6178 100644 --- a/include/llvm/Support/GenericDomTree.h +++ b/include/llvm/Support/GenericDomTree.h @@ -29,10 +29,8 @@ namespace llvm { -//===----------------------------------------------------------------------===// -/// DominatorBase - Base class that other, more interesting dominator analyses +/// \brief Base class that other, more interesting dominator analyses /// inherit from. -/// template class DominatorBase { protected: @@ -54,11 +52,10 @@ public: }; -//===----------------------------------------------------------------------===// -// DomTreeNodeBase - Dominator Tree Node template class DominatorTreeBase; struct PostDominatorTree; +/// \brief Base class for the actual dominator tree node. template class DomTreeNodeBase { NodeT *TheBB; @@ -169,14 +166,15 @@ inline void PrintDomTree(const DomTreeNodeBase *N, raw_ostream &o, PrintDomTree(*I, o, Lev+1); } -//===----------------------------------------------------------------------===// -/// DominatorTree - Calculate the immediate dominator tree for a function. -/// - +// The calculate routine is provided in a separate header but referenced here. template void Calculate(DominatorTreeBase::NodeType>& DT, FuncT& F); +/// \brief Core dominator tree base class. +/// +/// This class is a generic template over graph nodes. It is instantiated for +/// various graphs in the LLVM IR or in the code generator. template class DominatorTreeBase : public DominatorBase { bool dominatedBySlowTreeWalk(const DomTreeNodeBase *A,