use continue to avoid nesting, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40819 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2007-08-04 20:07:06 +00:00
parent fb312c7e44
commit 6c81213b4c

View File

@@ -611,13 +611,16 @@ void PromoteMem2Reg::MarkDominatingPHILive(BasicBlock *BB, unsigned AllocaNum,
BasicBlock *DomBB = IDom->getBlock(); BasicBlock *DomBB = IDom->getBlock();
DenseMap<std::pair<BasicBlock*, unsigned>, PHINode*>::iterator DenseMap<std::pair<BasicBlock*, unsigned>, PHINode*>::iterator
I = NewPhiNodes.find(std::make_pair(DomBB, AllocaNum)); I = NewPhiNodes.find(std::make_pair(DomBB, AllocaNum));
if (I != NewPhiNodes.end()) { if (I == NewPhiNodes.end()) continue;
// Ok, we found an inserted PHI node which dominates this value. // Ok, we found an inserted PHI node which dominates this value.
PHINode *DominatingPHI = I->second; PHINode *DominatingPHI = I->second;
// Find out if we previously thought it was dead. If so, mark it as being // Find out if we previously thought it was dead. If so, mark it as being
// live by removing it from the DeadPHINodes set. // live by removing it from the DeadPHINodes set.
if (DeadPHINodes.erase(DominatingPHI)) { if (!DeadPHINodes.erase(DominatingPHI))
continue;
// Now that we have marked the PHI node alive, also mark any PHI nodes // Now that we have marked the PHI node alive, also mark any PHI nodes
// which it might use as being alive as well. // which it might use as being alive as well.
for (pred_iterator PI = pred_begin(DomBB), PE = pred_end(DomBB); for (pred_iterator PI = pred_begin(DomBB), PE = pred_end(DomBB);
@@ -625,8 +628,6 @@ void PromoteMem2Reg::MarkDominatingPHILive(BasicBlock *BB, unsigned AllocaNum,
MarkDominatingPHILive(*PI, AllocaNum, DeadPHINodes); MarkDominatingPHILive(*PI, AllocaNum, DeadPHINodes);
} }
} }
}
}
/// PromoteLocallyUsedAlloca - Many allocas are only used within a single basic /// PromoteLocallyUsedAlloca - Many allocas are only used within a single basic
/// block. If this is the case, avoid traversing the CFG and inserting a lot of /// block. If this is the case, avoid traversing the CFG and inserting a lot of