[Mlir-commits] [mlir] [mlir] Make remove-dead-values remove block and successorOperands before delete ops (PR #166766)
lonely eagle
llvmlistbot at llvm.org
Tue Nov 18 01:27:07 PST 2025
================
@@ -742,7 +742,48 @@ static void processBranchOp(BranchOpInterface branchOp, RunLivenessAnalysis &la,
static void cleanUpDeadVals(RDVFinalCleanupList &list) {
LDBG() << "Starting cleanup of dead values...";
- // 1. Operations
+ // 1. Blocks
+ LDBG() << "Cleaning up " << list.blocks.size() << " block argument lists";
+ for (auto &b : list.blocks) {
+ // blocks that are accessed via multiple codepaths processed once
+ if (b.b->getNumArguments() != b.nonLiveArgs.size())
----------------
linuxlonelyeagle wrote:
When running ninja check-mlir, it deletes a block multiple times during testing.
https://github.com/llvm/llvm-project/pull/166766
More information about the Mlir-commits
mailing list