This is an archive of the discontinued LLVM Phabricator instance.

[mlir] add complex type to getZeroAttr
ClosedPublic

Authored by aartbik on Jul 7 2022, 1:17 PM.

Details

Diff Detail

Event Timeline

aartbik created this revision.Jul 7 2022, 1:17 PM
Herald added a reviewer: ftynse. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
aartbik requested review of this revision.Jul 7 2022, 1:17 PM
aartbik added inline comments.Jul 7 2022, 1:18 PM
mlir/lib/IR/BuiltinAttributes.cpp
1592

@rriddle : is this an acceptable solution? do zero attributes need more, like a named attribute or something like that?

rriddle requested changes to this revision.Jul 7 2022, 1:21 PM
rriddle added inline comments.
mlir/lib/IR/BuiltinAttributes.cpp
1592

Nah, this looks fine for the most part. This should just return whatever the agreed upon attribute interpretation of the type is.

1595

This will fail on integer elements.

This revision now requires changes to proceed.Jul 7 2022, 1:21 PM

Thanks for having such a quick look.

mlir/lib/IR/BuiltinAttributes.cpp
1595

Good point yes!

aartbik updated this revision to Diff 443057.Jul 7 2022, 2:03 PM

int/fp as element inside complex

aartbik retitled this revision from WIP [mlir] add complex type to getZeroAttr to [mlir] add complex type to getZeroAttr.Jul 7 2022, 2:03 PM
rriddle accepted this revision.Jul 7 2022, 3:00 PM
This revision is now accepted and ready to land.Jul 7 2022, 3:00 PM
This revision was automatically updated to reflect the committed changes.