diff --git a/llvm/include/llvm/Support/GenericDomTree.h b/llvm/include/llvm/Support/GenericDomTree.h --- a/llvm/include/llvm/Support/GenericDomTree.h +++ b/llvm/include/llvm/Support/GenericDomTree.h @@ -473,7 +473,7 @@ // If either A or B is a entry block then it is nearest common dominator // (for forward-dominators). if (!isPostDominator()) { - NodeT &Entry = A->getParent()->front(); + NodeT &Entry = *GraphTraits::getEntryNode(A); if (A == &Entry || B == &Entry) return &Entry; } diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h --- a/llvm/lib/Transforms/Vectorize/VPlan.h +++ b/llvm/lib/Transforms/Vectorize/VPlan.h @@ -2111,12 +2111,6 @@ EntryBlock->setParent(this); } - // FIXME: DominatorTreeBase is doing 'A->getParent()->front()'. 'front' is a - // specific interface of llvm::Function, instead of using - // GraphTraints::getEntryNode. We should add a new template parameter to - // DominatorTreeBase representing the Graph type. - VPBlockBase &front() const { return *Entry; } - const VPBlockBase *getExiting() const { return Exiting; } VPBlockBase *getExiting() { return Exiting; }