mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Use Loop::block_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52616 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -67,8 +67,9 @@ LoopPass *llvm::createLoopUnrollPass() { return new LoopUnroll(); }
|
||||
/// ApproximateLoopSize - Approximate the size of the loop.
|
||||
static unsigned ApproximateLoopSize(const Loop *L) {
|
||||
unsigned Size = 0;
|
||||
for (unsigned i = 0, e = L->getBlocks().size(); i != e; ++i) {
|
||||
BasicBlock *BB = L->getBlocks()[i];
|
||||
for (Loop::block_iterator I = L->block_begin(), E = L->block_end();
|
||||
I != E; ++I) {
|
||||
BasicBlock *BB = *I;
|
||||
Instruction *Term = BB->getTerminator();
|
||||
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) {
|
||||
if (isa<PHINode>(I) && BB == L->getHeader()) {
|
||||
|
||||
Reference in New Issue
Block a user