[mlir][ods] Improve integer signedness modelling
authorLei Zhang <antiagainst@google.com>
Wed, 4 Mar 2020 19:41:27 +0000 (14:41 -0500)
committerLei Zhang <antiagainst@google.com>
Wed, 4 Mar 2020 20:05:42 +0000 (15:05 -0500)
commit5b2cc6c3d0024d0d05e881d74d63be0ea2dca546
treeb47418f3703c25aa6b89c226d87c4033631373ae
parente46f0fee3066240389e20dc847a281274dc81d2e
[mlir][ods] Improve integer signedness modelling

A previous commit added support for integer signedness in C++
IntegerType. This change introduces ODS definitions for
integer types and integer (element) attributes w.r.t. signedness.

This commit also updates various existing definitions' descriptions
to mention signless where suitable to make it more clear.

Positive and non-negative integer attributes are removed to avoid
the explosion of subclasses. Instead, one should use more atmoic
constraints together with Confined to model that. For example,
`Confined<..., [IntPositive]>`.

Differential Revision: https://reviews.llvm.org/D75610
12 files changed:
mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
mlir/include/mlir/IR/OpBase.td
mlir/test/Dialect/LLVMIR/global.mlir
mlir/test/Dialect/Loops/invalid.mlir
mlir/test/Dialect/SPIRV/ops.mlir
mlir/test/IR/attribute.mlir
mlir/test/IR/invalid-ops.mlir
mlir/test/lib/TestDialect/TestOps.td
mlir/test/mlir-tblgen/predicate.td
mlir/test/mlir-tblgen/types.mlir