This patch adds a an eraseArguments function that erases a subrange of
a block's arguments. This can be used inplace of the terrible pattern
block->eraseArguments(llvm::to_vector(llvm::seq(...)));
Paths
| Differential D132890
[mlir] Add `Block::eraseArguments` that erases a subrange ClosedPublic Authored by Mogball on Aug 29 2022, 2:37 PM.
Details Summary This patch adds a an eraseArguments function that erases a subrange of block->eraseArguments(llvm::to_vector(llvm::seq(...)));
Diff Detail
Event Timelinerriddle added inline comments.
This revision is now accepted and ready to land.Aug 29 2022, 2:44 PM
This revision was landed with ongoing or failed builds.Aug 29 2022, 3:34 PM Closed by commit rG5b569ed2cdfb: [mlir] Add `Block::eraseArguments` that erases a subrange (authored by Mogball). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 456477 mlir/include/mlir/IR/Block.h
mlir/lib/Conversion/TosaToSCF/TosaToSCF.cpp
mlir/lib/Dialect/Affine/Utils/Utils.cpp
mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp
mlir/lib/IR/Block.cpp
|
Is this one used anywhere? Kind of sad that we are growing so many different ways to erase arguments. I wonder if it'd be better to just have an erase method on BlockArgument and drop some of these overloads. Maybe also having a custom BlockArgumentList that has some utility erase methods as well (for batch erasing ranges).