From: Owen Anderson Date: Mon, 9 Apr 2007 04:07:36 +0000 (+0000) Subject: Move isReachableFromEntry out of line to avoid an unnecessary #include X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8ea325730c6b914350008f1d8160345bfc4781d6;p=oota-llvm.git Move isReachableFromEntry out of line to avoid an unnecessary #include git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35797 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index b6453bae173..03a579f5c87 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -27,7 +27,6 @@ #define LLVM_ANALYSIS_DOMINATORS_H #include "llvm/Analysis/ET-Forest.h" -#include "llvm/Function.h" #include "llvm/Pass.h" #include @@ -408,9 +407,7 @@ public: /// isReachableFromEntry - Return true if A is dominated by the entry /// block of the function containing it. - bool isReachableFromEntry(BasicBlock* A) { - return dominates(&A->getParent()->getEntryBlock(), A); - } + const bool isReachableFromEntry(BasicBlock* A); /// Return the nearest common dominator of A and B. BasicBlock *nearestCommonDominator(BasicBlock *A, BasicBlock *B) const { diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp index 3206ba2e51a..45a2cebb630 100644 --- a/lib/VMCore/Dominators.cpp +++ b/lib/VMCore/Dominators.cpp @@ -873,6 +873,12 @@ bool ETForestBase::dominates(Instruction *A, Instruction *B) { } } +/// isReachableFromEntry - Return true if A is dominated by the entry +/// block of the function containing it. +const bool ETForestBase::isReachableFromEntry(BasicBlock* A) { + return dominates(&A->getParent()->getEntryBlock(), A); +} + ETNode *ETForest::getNodeForBlock(BasicBlock *BB) { ETNode *&BBNode = Nodes[BB]; if (BBNode) return BBNode;