diff options
| author | Owen Anderson <resistor@mac.com> | 2007-04-09 04:07:36 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2007-04-09 04:07:36 +0000 |
| commit | 6978893a8fc55a637b339c25071245d1981aa051 (patch) | |
| tree | a01cce98078fb769a380e6be1085857006a31dc6 | |
| parent | a2e2e5640a8e0d34429f6a916255ec9d9cdef30e (diff) | |
| download | bcm5719-llvm-6978893a8fc55a637b339c25071245d1981aa051.tar.gz bcm5719-llvm-6978893a8fc55a637b339c25071245d1981aa051.zip | |
Move isReachableFromEntry out of line to avoid an unnecessary #include
llvm-svn: 35797
| -rw-r--r-- | llvm/include/llvm/Analysis/Dominators.h | 5 | ||||
| -rw-r--r-- | llvm/lib/VMCore/Dominators.cpp | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/llvm/include/llvm/Analysis/Dominators.h b/llvm/include/llvm/Analysis/Dominators.h index b6453bae173..03a579f5c87 100644 --- a/llvm/include/llvm/Analysis/Dominators.h +++ b/llvm/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 <set> @@ -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/llvm/lib/VMCore/Dominators.cpp b/llvm/lib/VMCore/Dominators.cpp index 3206ba2e51a..45a2cebb630 100644 --- a/llvm/lib/VMCore/Dominators.cpp +++ b/llvm/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; |

