[mlir] scf::ForOp: Drop iter arguments (and corresponding result) with no use
'ForOpIterArgsFolder' can now remove iterator arguments (and corresponding results) with no use. Example: ``` %cst = constant 32 : i32 %0:2 = scf.for %arg1 = %lb to %ub step %step iter_args(%arg2 = %arg0, %arg3 = %cst) -> (i32, i32) { %1 = addu %arg2, %cst : i32 scf.yield %1, %1 : i32, i32 } use(%0#0) ``` %arg3 is not used in the block, and its corresponding result `%0#1` has no use, thus remove the iter argument. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D98711
Loading
Please register or sign in to comment