Some implicit ilist iterator conversions have crept back into Analysis,
Transforms, Hexagon, and llvm-stress. This removes them.
I'll commit a patch immediately after this to disallow them (in a
separate patch so that it's easy to revert if necessary).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252371
91177308-0d34-0410-b5e6-
96231b3b80d8
if (isa<LandingPadInst>(IP) || isa<CleanupPadInst>(IP)) {
++IP;
} else if (auto *TPI = dyn_cast<TerminatePadInst>(IP)) {
- IP = TPI->getUnwindDest()->getFirstNonPHI();
+ IP = TPI->getUnwindDest()->getFirstNonPHI()->getIterator();
} else if (auto *CEPI = dyn_cast<CatchEndPadInst>(IP)) {
- IP = CEPI->getUnwindDest()->getFirstNonPHI();
+ IP = CEPI->getUnwindDest()->getFirstNonPHI()->getIterator();
} else if (auto *CEPI = dyn_cast<CleanupEndPadInst>(IP)) {
- IP = CEPI->getUnwindDest()->getFirstNonPHI();
+ IP = CEPI->getUnwindDest()->getFirstNonPHI()->getIterator();
} else if (isa<CatchPadInst>(IP)) {
IP = MustDominate->getFirstInsertionPt();
} else {
if (It == End) {
MachineFunction::const_iterator BIt = B.getIterator();
MachineFunction::const_iterator Next = std::next(BIt);
- if (Next != MF.end() && B.isSuccessor(Next)) {
+ if (Next != MF.end() && B.isSuccessor(&*Next)) {
int ThisN = B.getNumber();
int NextN = Next->getNumber();
FlowQ.push(CFGEdge(ThisN, NextN));
return true;
}
- Uses.push_back(std::next(F->arg_begin(), UseIndex));
+ Uses.push_back(&*std::next(F->arg_begin(), UseIndex));
return false;
}
Value *Initial =
new LoadInst(InitialPtr, "load_initial", PH->getTerminator());
PHINode *PHI = PHINode::Create(Initial->getType(), 2, "store_forwarded",
- L->getHeader()->begin());
+ &L->getHeader()->front());
PHI->addIncoming(Initial, PH);
PHI->addIncoming(Cand.Store->getOperand(0), L->getLoopLatch());
if (PHI)
return PHI;
- PHI = PHINode::Create(V->getType(), 2, "simplifycfg.merge", Succ->begin());
+ PHI = PHINode::Create(V->getType(), 2, "simplifycfg.merge", &Succ->front());
PHI->addIncoming(V, BB);
for (BasicBlock *PredBB : predecessors(Succ))
if (PredBB != BB)
Value *QPHI = ensureValueAvailableInSuccessor(QStore->getValueOperand(),
QStore->getParent(), PPHI);
- IRBuilder<> QB(PostBB->getFirstInsertionPt());
-
+ IRBuilder<> QB(&*PostBB->getFirstInsertionPt());
+
Value *PPred = PStore->getParent() == PTB ? PCond : QB.CreateNot(PCond);
Value *QPred = QStore->getParent() == QTB ? QCond : QB.CreateNot(QCond);
QPred = QB.CreateNot(QPred);
Value *CombinedPred = QB.CreateOr(PPred, QPred);
- auto *T = SplitBlockAndInsertIfThen(CombinedPred, QB.GetInsertPoint(), false);
+ auto *T =
+ SplitBlockAndInsertIfThen(CombinedPred, &*QB.GetInsertPoint(), false);
QB.SetInsertPoint(T);
StoreInst *SI = cast<StoreInst>(QB.CreateStore(QPHI, Address));
AAMDNodes AAMD;
for (auto *Instr : BoolInst) {
BasicBlock *Curr = Instr->getParent();
- BasicBlock::iterator Loc = Instr;
+ BasicBlock::iterator Loc = Instr->getIterator();
BasicBlock *Next = Curr->splitBasicBlock(Loc, "CF");
Instr->moveBefore(Curr->getTerminator());
if (Curr != &F->getEntryBlock()) {