[llvm] [SandboxVec][BottomUpVec] Clean up dead instructions (PR #115267)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 7 19:27:35 PST 2024
================
@@ -153,6 +153,20 @@ Value *BottomUpVec::createVectorInstr(ArrayRef<Value *> Bndl,
// TODO: Propagate debug info.
}
+void BottomUpVec::tryEraseDeadInstrs() {
+ bool Change = true;
+ while (Change) {
+ Change = false;
+ for (Instruction *I : make_early_inc_range(DeadInstrCandidates)) {
+ if (I->hasNUses(0)) {
----------------
vporpo wrote:
I changed this to a single loop. I am sorting DeadInstrCandidates right before walking through it.
https://github.com/llvm/llvm-project/pull/115267
More information about the llvm-commits
mailing list