- Change Operation::create() methods to use TypeRange for result types, ValueRange for operands and SuccessorRange for successors.
- Extend SuccessorRange to be able to represent a range of blocks from BlockOperands or from an array of Block pointers.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks!
mlir/include/mlir/IR/BlockSupport.h | ||
---|---|---|
58 | I would not do this for SuccessorRange. It is intended to have the same limited scope that OperandRange and ResultRange have. If we want something general I would suggest adding a BlockRange instead. |
mlir/include/mlir/IR/BlockSupport.h | ||
---|---|---|
58 | Thanks. I looked into how ResultRange, OperandRange and ValueRange are layered. So I guess your suggestion is to keep SuccessorRange as is, and add a new BlockRange which can work with either a SuccessorRange or an ArrayRef<Block *>, right? And then the Operation::create() functions would use a BlockRange argument for successors. |
mlir/include/mlir/IR/BlockSupport.h | ||
---|---|---|
58 | Yes, exactly. |
mlir/include/mlir/IR/BlockSupport.h | ||
---|---|---|
82 | Missing doc comment. |
I would not do this for SuccessorRange. It is intended to have the same limited scope that OperandRange and ResultRange have. If we want something general I would suggest adding a BlockRange instead.