This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Refactor BoolAttr to be a special case of IntegerAttr
ClosedPublic

Authored by rriddle on Jun 2 2020, 6:20 PM.

Details

Summary

This simplifies a lot of handling of BoolAttr/IntegerAttr. For example, a lot of places currently have to handle both IntegerAttr and BoolAttr. In other places, a decision is made to pick one which can lead to surprising results for users. For example, DenseElementsAttr currently uses BoolAttr for i1 even if the user initialized it with an Array of i1 IntegerAttrs.

Diff Detail

Event Timeline

rriddle created this revision.Jun 2 2020, 6:20 PM
ftynse accepted this revision.Jun 3 2020, 1:08 AM

Thanks!

This revision is now accepted and ready to land.Jun 3 2020, 1:08 AM
jpienaar accepted this revision.Jun 3 2020, 7:50 AM

Nice, thanks

antiagainst accepted this revision.Jun 4 2020, 10:48 AM

Nice, thanks!

This revision was automatically updated to reflect the committed changes.