[llvm-commits] [llvm] r74240 - /llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
Dan Gohman
gohman at apple.com
Thu Jun 25 17:26:03 PDT 2009
Author: djg
Date: Thu Jun 25 19:26:03 2009
New Revision: 74240
URL: http://llvm.org/viewvc/llvm-project?rev=74240&view=rev
Log:
Minor code simplification.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp?rev=74240&r1=74239&r2=74240&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp Thu Jun 25 19:26:03 2009
@@ -371,12 +371,8 @@
/// PHINode may not have an entry for the original pre-header.
void LoopRotate::updateExitBlock() {
- for (BasicBlock::iterator I = Exit->begin(), E = Exit->end();
- I != E; ++I) {
-
- PHINode *PN = dyn_cast<PHINode>(I);
- if (!PN)
- break;
+ for (BasicBlock::iterator I = Exit->begin();
+ PHINode *PN = dyn_cast<PHINode>(I); ++I) {
// There is already one incoming value from original pre-header block.
if (PN->getBasicBlockIndex(OrigPreHeader) != -1)
@@ -384,7 +380,7 @@
const RenameData *ILoopHeaderInfo;
Value *V = PN->getIncomingValueForBlock(OrigHeader);
- if (isa<Instruction>(V) &&
+ if (isa<Instruction>(V) &&
(ILoopHeaderInfo = findReplacementData(cast<Instruction>(V)))) {
assert(ILoopHeaderInfo->PreHeader && "Missing New Preheader Instruction");
PN->addIncoming(ILoopHeaderInfo->PreHeader, OrigPreHeader);
More information about the llvm-commits
mailing list