mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 23:24:34 +00:00
Use the isReachableFromEntry method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153400 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -772,14 +772,12 @@ public:
|
|||||||
LoopT *L = new LoopT(BB);
|
LoopT *L = new LoopT(BB);
|
||||||
BBMap[BB] = L;
|
BBMap[BB] = L;
|
||||||
|
|
||||||
BlockT *EntryBlock = BB->getParent()->begin();
|
|
||||||
|
|
||||||
while (!TodoStack.empty()) { // Process all the nodes in the loop
|
while (!TodoStack.empty()) { // Process all the nodes in the loop
|
||||||
BlockT *X = TodoStack.back();
|
BlockT *X = TodoStack.back();
|
||||||
TodoStack.pop_back();
|
TodoStack.pop_back();
|
||||||
|
|
||||||
if (!L->contains(X) && // As of yet unprocessed??
|
if (!L->contains(X) && // As of yet unprocessed??
|
||||||
DT.dominates(EntryBlock, X)) { // X is reachable from entry block?
|
DT.isReachableFromEntry(X)) {
|
||||||
// Check to see if this block already belongs to a loop. If this occurs
|
// Check to see if this block already belongs to a loop. If this occurs
|
||||||
// then we have a case where a loop that is supposed to be a child of
|
// then we have a case where a loop that is supposed to be a child of
|
||||||
// the current loop was processed before the current loop. When this
|
// the current loop was processed before the current loop. When this
|
||||||
|
Reference in New Issue
Block a user