[PATCH] D138976: [NFC] Replaces: BB->getInstList().erase(I) with I->eraseFromParent().
Vasileios Porpodas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 12 16:23:35 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4c5469e2c0c5: [NFC] Replaces: BB->getInstList().erase(I) with I->eraseFromParent(). (authored by vporpo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138976/new/
https://reviews.llvm.org/D138976
Files:
llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
Index: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
+++ llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
@@ -716,8 +716,8 @@
BranchInst *NewBI = BranchInst::Create(HeaderBB, Ret);
NewBI->setDebugLoc(CI->getDebugLoc());
- BB->getInstList().erase(Ret); // Remove return.
- BB->getInstList().erase(CI); // Remove call.
+ Ret->eraseFromParent(); // Remove return.
+ CI->eraseFromParent(); // Remove call.
DTU.applyUpdates({{DominatorTree::Insert, BB, HeaderBB}});
++NumEliminated;
return true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138976.482307.patch
Type: text/x-patch
Size: 663 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221213/952d7082/attachment.bin>
More information about the llvm-commits
mailing list