[Mlir-commits] [mlir] [MLIR][RemoveDeadValues] Fix affine.for induction variable incorrectly removed (PR #172612)
Mehdi Amini
llvmlistbot at llvm.org
Wed Dec 17 01:28:08 PST 2025
================
@@ -327,6 +328,32 @@ RunLivenessAnalysis::RunLivenessAnalysis(Operation *op) {
solver.load<LivenessAnalysis>(symbolTable);
LDBG() << "Initializing and running solver";
(void)solver.initializeAndRun(op);
+
+ // Mark block arguments of RegionBranchOpInterface ops that are NOT successor
+ // inputs as live. These include induction variables (IVs) like those in
+ // affine.for or scf.for. The fix in visitBranchOperand() only handles this
----------------
joker-eph wrote:
I wouldn't expect to read "The fix in visitBranchOperand()" in a code comment, this is too contextual to your historical investigation.
Also can you clarify how this new code interacts with the fix that was made to `visitBranchOperand()`?
Is the handling in `visitBranchOperand()` still relevant or is this superseding it?
https://github.com/llvm/llvm-project/pull/172612
More information about the Mlir-commits
mailing list