}
}
-// CloneDomInfo - NewBB is cloned from Orig basic block. Now clone Dominator Info.
+// CloneDomInfo - NewBB is cloned from Orig basic block. Now clone Dominator
+// Info.
//
// If Orig block's immediate dominator is mapped in VM then use corresponding
// immediate dominator from the map. Otherwise Orig block's dominator is also
if (LBBI != DF->end()) {
DominanceFrontier::DomSetType &LBSet = LBBI->second;
for (DominanceFrontier::DomSetType::iterator LI = LBSet.begin(),
- LE = LBSet.end(); LI != LE; ++LI) {
- BasicBlock *B = *LI;
+ LE = LBSet.end(); LI != LE; /* NULL */) {
+ BasicBlock *B = *LI++;
if (OutSiders.count(B))
DF->removeFromFrontier(LBBI, B);
}
if (NBBI != DF->end()) {
DominanceFrontier::DomSetType NBSet = NBBI->second;
for (DominanceFrontier::DomSetType::iterator NI = NBSet.begin(),
- NE = NBSet.end(); NI != NE; ++NI) {
- BasicBlock *B = *NI;
+ NE = NBSet.end(); NI != NE; /* NULL */) {
+ BasicBlock *B = *NI++;
if (OutSiders.count(B))
DF->removeFromFrontier(NBBI, B);
}
switch (I->getOpcode()) {
case Instruction::Select:
if (ConstantInt *CB = dyn_cast<ConstantInt>(I->getOperand(0))) {
- ReplaceUsesOfWith(I, I->getOperand(!CB->getZExtValue()+1), Worklist, L, LPM);
+ ReplaceUsesOfWith(I, I->getOperand(!CB->getZExtValue()+1), Worklist, L,
+ LPM);
continue;
}
break;