This patch changes value_begin_impl to a faillable
try_value_begin_impl so that specific cases can fail iteration if the
type doesn't match the internal storage.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/IR/BuiltinAttributes.td | ||
---|---|---|
435–437 | This doesn't look right, this implementation will crash if it can't iterate. I suppose that these are more annoying to check for (DenseElementsAttr+SparseElementsAttr), but we'll need at least a TODO here. This isn't the desired end state. | |
mlir/include/mlir/Support/LogicalResult.h | ||
103 | Can we use is_convertible here instead of is_same? |
mlir/include/mlir/IR/BuiltinAttributes.td | ||
---|---|---|
435–437 | ElementsAttr::getValues also crashes if it can't iterate. That's why there's a tryGetValues method. Should I add one here as well? |
mlir/include/mlir/IR/BuiltinAttributes.td | ||
---|---|---|
435–437 | Whoops I meant try_value_begin 🙃 ⚡ |
mlir/include/mlir/IR/BuiltinAttributes.td | ||
---|---|---|
435–437 | Done in https://reviews.llvm.org/D132958 |
This doesn't look right, this implementation will crash if it can't iterate. I suppose that these are more annoying to check for (DenseElementsAttr+SparseElementsAttr), but we'll need at least a TODO here. This isn't the desired end state.