mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:29:51 +00:00
ADT: Remove last implicit ilist iterator conversions, NFC
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). llvm-svn: 252371
This commit is contained in:
parent
48f3ee66bd
commit
2c4e1a2f50
@ -101,11 +101,11 @@ static BasicBlock::iterator findInsertPointAfter(Instruction *I,
|
||||
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 {
|
||||
|
@ -1106,7 +1106,7 @@ void BT::run() {
|
||||
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));
|
||||
|
@ -335,7 +335,7 @@ struct ArgumentUsesTracker : public CaptureTracker {
|
||||
return true;
|
||||
}
|
||||
|
||||
Uses.push_back(std::next(F->arg_begin(), UseIndex));
|
||||
Uses.push_back(&*std::next(F->arg_begin(), UseIndex));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -373,7 +373,7 @@ public:
|
||||
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());
|
||||
|
||||
|
@ -2400,7 +2400,7 @@ static Value *ensureValueAvailableInSuccessor(Value *V, BasicBlock *BB,
|
||||
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)
|
||||
@ -2500,8 +2500,8 @@ static bool mergeConditionalStoreToAddress(BasicBlock *PTB, BasicBlock *PFB,
|
||||
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);
|
||||
|
||||
@ -2511,7 +2511,8 @@ static bool mergeConditionalStoreToAddress(BasicBlock *PTB, BasicBlock *PFB,
|
||||
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;
|
||||
|
@ -666,7 +666,7 @@ static void IntroduceControlFlow(Function *F, Random &R) {
|
||||
|
||||
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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user