[Mlir-commits] [mlir] [MLIR] EmitC: Add subscript operator (PR #84783)
Matthias Gehre
llvmlistbot at llvm.org
Wed Mar 13 02:21:16 PDT 2024
mgehre-amd wrote:
> Thanks for the PR @mgehre-amd. Some early comments before looking into the changes in the emitter.
>
> I can imagine different types to be subscriptable with different constraints, some of which you already check for.
>
> ###### array type
> * indices should be integer like, we use `IntegerIndexOrOpaqueType`in other places for this
> * element type and result type should match
> * number of indices should match rank of the array type
>
> ###### pointer type
> * index should be integer like, we use `IntegerIndexOrOpaqueType`in other places for this
> * pointee type and result type should match
> * only one index allowed
>
> ###### opaque type
> * indices can be any type
> * result can be any type
> * number of indices can be variadic since C++23
Thanks for your comments! Do you think we can split support for SubscriptOp for this additional types into separate PRs?
https://github.com/llvm/llvm-project/pull/84783
More information about the Mlir-commits
mailing list