1//===- LoopSimplify.cpp - Loop Canonicalization Pass ----------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
--- 291 unchanged lines hidden (view full) ---
300 if (DF) DF->removeBlock(ExitingBlock);
301
302 BI->getSuccessor(0)->removePredecessor(ExitingBlock);
303 BI->getSuccessor(1)->removePredecessor(ExitingBlock);
304 ExitingBlock->eraseFromParent();
305 }
306 }
307
308 return Changed;
309}
310
311/// InsertPreheaderForLoop - Once we discover that a loop doesn't have a
312/// preheader, this method is called to insert one. This method has two phases:
313/// preheader insertion and analysis updating.
314///
315BasicBlock *LoopSimplify::InsertPreheaderForLoop(Loop *L) {
--- 368 unchanged lines hidden ---
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
--- 291 unchanged lines hidden (view full) ---
300 if (DF) DF->removeBlock(ExitingBlock);
301
302 BI->getSuccessor(0)->removePredecessor(ExitingBlock);
303 BI->getSuccessor(1)->removePredecessor(ExitingBlock);
304 ExitingBlock->eraseFromParent();
305 }
306 }
307
308 return Changed;
309}
310
311/// InsertPreheaderForLoop - Once we discover that a loop doesn't have a
312/// preheader, this method is called to insert one. This method has two phases:
313/// preheader insertion and analysis updating.
314///
315BasicBlock *LoopSimplify::InsertPreheaderForLoop(Loop *L) {
--- 368 unchanged lines hidden ---