Create empty block without the terminator in this case.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Some notes:
- I cannot do beforeBuilder=nullptr in builder def, because it will conflict with default-generated builder and I cannot remove default builder because it is already being used in ForToWhile pass
- Current behavior is different from ForOp::build which tries to create default terminator in case if it have zero args https://github.com/llvm/llvm-project/blob/e78d341f936e52df92279cc5bff1bff0625b7d23/mlir/lib/Dialect/SCF/IR/SCF.cpp#L313 but I don't like this approach as it will forces to handle these 2 cases differently on user side
mlir/lib/Dialect/SCF/IR/SCF.cpp | ||
---|---|---|
3817–3819 | Nit: it's possible to update the OpBuilder definition in ODS and use CArg there to produce default values for these. |
mlir/lib/Dialect/SCF/IR/SCF.cpp | ||
---|---|---|
3817–3819 | see my previous comment |
Nit: it's possible to update the OpBuilder definition in ODS and use CArg there to produce default values for these.