Allow IndexType inside tensors.
authorSean Silva <silvasean@google.com>
Tue, 24 Mar 2020 22:13:31 +0000 (15:13 -0700)
committerSean Silva <silvasean@google.com>
Thu, 26 Mar 2020 17:52:48 +0000 (10:52 -0700)
commit3dceb6d2460550ef8c2e53df2181c8a11a7e6730
tree55b4e4b69f14a14e29e2e4f4e0485373b226c578
parent47e7bdb10732e6f140adce39a1bc34e3ee2a6ea6
Allow IndexType inside tensors.

It's common in many dialects to use tensors to themselves hold tensor shapes (for example, the shape is itself the result of some non-trivial calculation). Currently, such dialects have to use `tensor<?xi64>` or worse (like allowing either i32 or i64 tensors to represent shapes). `tensor<?xindex>` is the natural type to represent this, but is currently disallowed. This patch allows it.

Differential Revision: https://reviews.llvm.org/D76726
mlir/docs/Rationale.md
mlir/include/mlir/IR/StandardTypes.h
mlir/test/IR/invalid.mlir