This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Fix try_value_begin_impl for DenseElementsAttr
ClosedPublic

Authored by Mogball on Aug 30 2022, 10:45 AM.

Details

Summary

The previous implementation would still crash if the element type was
not iterable. This patch changes SparseElementsAttr to properly
implement try_value_begin_impl according to ElementsAttr and changes
DenseElementsAttr to implement tryGetValues as the basis for querying
element values.

Depends on D132904

Diff Detail

Event Timeline

Mogball created this revision.Aug 30 2022, 10:45 AM
Mogball requested review of this revision.Aug 30 2022, 10:45 AM
rriddle accepted this revision.Aug 30 2022, 12:41 PM

Thanks!

This revision is now accepted and ready to land.Aug 30 2022, 12:41 PM
This revision was automatically updated to reflect the committed changes.