This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add availability field in op and enum cases
AbandonedPublic

Authored by antiagainst on Aug 10 2021, 10:44 AM.

Details

Summary

This commit wires up availability into op and enum
cases by adding fields into the definitions. This
enables better integration with various generators.

Depends On D107846

Diff Detail

Event Timeline

antiagainst created this revision.Aug 10 2021, 10:44 AM
antiagainst requested review of this revision.Aug 10 2021, 10:44 AM
jpienaar added inline comments.Aug 17 2021, 10:23 AM
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
127

Could this be done even before the move? (e.g., an NFC before)

mlir/include/mlir/IR/OpBase.td
45

Why does it need to be forward declared?

Address comments

antiagainst marked 2 inline comments as done.Aug 18 2021, 11:31 AM
antiagainst added inline comments.
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
127

Good point. Moved to https://reviews.llvm.org/D108311.

mlir/include/mlir/IR/OpBase.td
45

Because MinVersionBase and MaxVersionBase (which subclass Availability) depends on EnumAttr, and EnumAttr now has a list<Availability> field. I prefer to keep Availability and Min/MaxVersionBase together; but I'm also fine to just move Availability here to avoid forward declarations.

antiagainst abandoned this revision.Aug 19 2021, 6:29 AM
antiagainst marked 2 inline comments as done.

Merged into D107846