From 32b38d248fd3c75abc5c86ab6677b6cb08a703cc Mon Sep 17 00:00:00 2001 From: Vasileios Porpodas Date: Wed, 14 Dec 2022 17:42:26 -0800 Subject: [NFC] Rename Instruction::insertAt() to Instruction::insertInto(), to be consistent with BasicBlock::insertInto() Differential Revision: https://reviews.llvm.org/D140085 --- llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp') diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp index a699540..acde526 100644 --- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -565,7 +565,7 @@ void llvm::ReplaceInstWithInst(BasicBlock *BB, BasicBlock::iterator &BI, I->setDebugLoc(BI->getDebugLoc()); // Insert the new instruction into the basic block... - BasicBlock::iterator New = I->insertAt(BB, BI); + BasicBlock::iterator New = I->insertInto(BB, BI); // Replace all uses of the old instruction, and delete it. ReplaceInstWithValue(BI, I); @@ -1343,12 +1343,12 @@ static void SplitLandingPadPredecessorsImpl( LandingPadInst *LPad = OrigBB->getLandingPadInst(); Instruction *Clone1 = LPad->clone(); Clone1->setName(Twine("lpad") + Suffix1); - Clone1->insertAt(NewBB1, NewBB1->getFirstInsertionPt()); + Clone1->insertInto(NewBB1, NewBB1->getFirstInsertionPt()); if (NewBB2) { Instruction *Clone2 = LPad->clone(); Clone2->setName(Twine("lpad") + Suffix2); - Clone2->insertAt(NewBB2, NewBB2->getFirstInsertionPt()); + Clone2->insertInto(NewBB2, NewBB2->getFirstInsertionPt()); // Create a PHI node for the two cloned landingpad instructions only // if the original landingpad instruction has some uses. @@ -1399,7 +1399,7 @@ ReturnInst *llvm::FoldReturnIntoUncondBranch(ReturnInst *RI, BasicBlock *BB, Instruction *UncondBranch = Pred->getTerminator(); // Clone the return and add it to the end of the predecessor. Instruction *NewRet = RI->clone(); - NewRet->insertAt(Pred, Pred->end()); + NewRet->insertInto(Pred, Pred->end()); // If the return instruction returns a value, and if the value was a // PHI node in "BB", propagate the right value into the return. @@ -1411,7 +1411,7 @@ ReturnInst *llvm::FoldReturnIntoUncondBranch(ReturnInst *RI, BasicBlock *BB, // return instruction. V = BCI->getOperand(0); NewBC = BCI->clone(); - NewBC->insertAt(Pred, NewRet->getIterator()); + NewBC->insertInto(Pred, NewRet->getIterator()); Op = NewBC; } @@ -1421,9 +1421,9 @@ ReturnInst *llvm::FoldReturnIntoUncondBranch(ReturnInst *RI, BasicBlock *BB, NewEV = EVI->clone(); if (NewBC) { NewBC->setOperand(0, NewEV); - NewEV->insertAt(Pred, NewBC->getIterator()); + NewEV->insertInto(Pred, NewBC->getIterator()); } else { - NewEV->insertAt(Pred, NewRet->getIterator()); + NewEV->insertInto(Pred, NewRet->getIterator()); Op = NewEV; } } -- cgit v1.1