mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-21 11:36:55 +00:00
[NFC][DebugInfo] Use iterators for insertion at some final callsites
These are the callsites that have materialised in the last three weeks since I last built with deprecation warnings.
This commit is contained in:
parent
7f845cba2c
commit
304a99091c
llvm
examples/IRTransforms
lib
Analysis
Target/SPIRV
Transforms
@ -286,7 +286,7 @@ static bool mergeIntoSinglePredecessor_v1(Function &F) {
|
||||
}
|
||||
// Move all instructions from BB to Pred.
|
||||
for (Instruction &I : make_early_inc_range(BB))
|
||||
I.moveBefore(Pred->getTerminator());
|
||||
I.moveBefore(Pred->getTerminator()->getIterator());
|
||||
|
||||
// Remove the Pred's terminator (which jumped to BB). BB's terminator
|
||||
// will become Pred's terminator.
|
||||
@ -337,7 +337,7 @@ static bool mergeIntoSinglePredecessor_v2(Function &F, DominatorTree &DT) {
|
||||
}
|
||||
// Move all instructions from BB to Pred.
|
||||
for (Instruction &I : make_early_inc_range(BB))
|
||||
I.moveBefore(Pred->getTerminator());
|
||||
I.moveBefore(Pred->getTerminator()->getIterator());
|
||||
|
||||
// Remove the Pred's terminator (which jumped to BB). BB's terminator
|
||||
// will become Pred's terminator.
|
||||
|
@ -361,7 +361,7 @@ bool llvm::isDereferenceableAndAlignedInLoop(
|
||||
} else
|
||||
return false;
|
||||
|
||||
Instruction *HeaderFirstNonPHI = L->getHeader()->getFirstNonPHI();
|
||||
Instruction *HeaderFirstNonPHI = &*L->getHeader()->getFirstNonPHIIt();
|
||||
return isDereferenceableAndAlignedPointer(Base, Alignment, AccessSize, DL,
|
||||
HeaderFirstNonPHI, AC, &DT);
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ void SPIRVRegularizer::runLowerConstExpr(Function &F) {
|
||||
LLVM_DEBUG(dbgs() << "[lowerConstantExpressions] " << *CE);
|
||||
auto ReplInst = CE->getAsInstruction();
|
||||
auto InsPoint = II->getParent() == &*FBegin ? II : &FBegin->back();
|
||||
ReplInst->insertBefore(InsPoint);
|
||||
ReplInst->insertBefore(InsPoint->getIterator());
|
||||
LLVM_DEBUG(dbgs() << " -> " << *ReplInst << '\n');
|
||||
std::vector<Instruction *> Users;
|
||||
// Do not replace use during iteration of use. Do it in another loop.
|
||||
@ -97,7 +97,7 @@ void SPIRVRegularizer::runLowerConstExpr(Function &F) {
|
||||
for (auto &User : Users) {
|
||||
if (ReplInst->getParent() == User->getParent() &&
|
||||
User->comesBefore(ReplInst))
|
||||
ReplInst->moveBefore(User);
|
||||
ReplInst->moveBefore(User->getIterator());
|
||||
User->replaceUsesOfWith(CE, ReplInst);
|
||||
}
|
||||
return ReplInst;
|
||||
|
@ -683,7 +683,7 @@ class SPIRVStructurizer : public FunctionPass {
|
||||
});
|
||||
|
||||
for (Instruction *I : MergeInstructions) {
|
||||
I->moveBefore(InsertionPoint);
|
||||
I->moveBefore(InsertionPoint->getIterator());
|
||||
InsertionPoint = I;
|
||||
}
|
||||
|
||||
|
@ -2044,7 +2044,7 @@ convertFSqrtDivIntoFMul(CallInst *CI, Instruction *X,
|
||||
// instructions in R2 and get the most common fpmath metadata and fast-math
|
||||
// flags on it.
|
||||
auto *FSqrt = cast<CallInst>(CI->clone());
|
||||
FSqrt->insertBefore(CI);
|
||||
FSqrt->insertBefore(CI->getIterator());
|
||||
auto *R2FPMathMDNode = (*R2.begin())->getMetadata(LLVMContext::MD_fpmath);
|
||||
FastMathFlags R2FMF = (*R2.begin())->getFastMathFlags(); // Common FMF
|
||||
for (Instruction *I : R2) {
|
||||
|
@ -10301,8 +10301,8 @@ preparePlanForEpilogueVectorLoop(VPlan &Plan, Loop *L,
|
||||
// value. This ensures correctness when the start value might not be
|
||||
// less than the minimum value of a monotonically increasing induction
|
||||
// variable.
|
||||
IRBuilder<> Builder(
|
||||
cast<Instruction>(ResumeV)->getParent()->getFirstNonPHI());
|
||||
BasicBlock *ResumeBB = cast<Instruction>(ResumeV)->getParent();
|
||||
IRBuilder<> Builder(ResumeBB, ResumeBB->getFirstNonPHIIt());
|
||||
Value *Cmp =
|
||||
Builder.CreateICmpEQ(ResumeV, RdxDesc.getRecurrenceStartValue());
|
||||
ResumeV =
|
||||
|
Loading…
x
Reference in New Issue
Block a user