mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-13 08:35:46 +00:00
Add a getUniqueExitBlock utility function, similar to getExitBlock,
but for getUniqueExitBlocks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74145 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6279cd85e9
commit
a278f3f552
@ -281,6 +281,16 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// getUniqueExitBlock - If getUniqueExitBlocks would return exactly one
|
||||||
|
/// block, return that block. Otherwise return null.
|
||||||
|
BlockT *getUniqueExitBlock() const {
|
||||||
|
SmallVector<BlockT*, 8> UniqueExitBlocks;
|
||||||
|
getUniqueExitBlocks(UniqueExitBlocks);
|
||||||
|
if (UniqueExitBlocks.size() == 1)
|
||||||
|
return UniqueExitBlocks[0];
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/// getLoopPreheader - If there is a preheader for this loop, return it. A
|
/// getLoopPreheader - If there is a preheader for this loop, return it. A
|
||||||
/// loop has a preheader if there is only one edge to the header of the loop
|
/// loop has a preheader if there is only one edge to the header of the loop
|
||||||
/// from outside of the loop. If this is the case, the block branching to the
|
/// from outside of the loop. If this is the case, the block branching to the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user