[Mlir-commits] [mlir] [MLIR] EmitC: Add subscript operator (PR #84783)
Simon Camphausen
llvmlistbot at llvm.org
Wed Mar 13 02:16:21 PDT 2024
simon-camp 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
https://github.com/llvm/llvm-project/pull/84783
More information about the Mlir-commits
mailing list