Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/SCF/IR/SCF.cpp | ||
---|---|---|
1483 | can we use getTerminator here? |
mlir/lib/Dialect/SCF/IR/SCF.cpp | ||
---|---|---|
1480 | this should be either a llvm::cast, otherwise you need to check whether the dynamic cast actually happened. |
Ah seems I never hit submit yesterday. Same comment as Alex on one and general question on verification part.
mlir/lib/Dialect/SCF/IR/SCF.cpp | ||
---|---|---|
1476 | Is the op invalid in that case? So here we are duplicating a bit of verification? Remember for builder methods invalid input is UB while for verification there is an order in which these run and so we should have checked that there is at least 1 region and that it satisfies SizedRegion<1>, given that do we need to verify these? | |
1484 | If you use result of dyn_cast without checking if null, then cast is preferred (you could move the the trait that says it should have yield before type inference one to have this verified before you get here). |
Thanks!
mlir/lib/Dialect/SCF/IR/SCF.cpp | ||
---|---|---|
1476 | For the builders, I agree. inferReturnTypes is used when the regions and blocks are fully set up. | |
1480 | Addressed in https://reviews.llvm.org/D142155 |
Is the op invalid in that case? So here we are duplicating a bit of verification? Remember for builder methods invalid input is UB while for verification there is an order in which these run and so we should have checked that there is at least 1 region and that it satisfies SizedRegion<1>, given that do we need to verify these?