[Mlir-commits] [mlir] [mlir][emitc] Add ArrayType (PR #83386)

Simon Camphausen llvmlistbot at llvm.org
Fri Mar 1 05:59:11 PST 2024


https://github.com/simon-camp requested changes to this pull request.

Thanks for the PR. After a quick look over the code, I have some points that should be considered when adding the array type.

* Arrays are not assignable, so the `AssignOp::verify` method should fail for array types
* For the same reason the emitter should fail when declaring variables for block arguments around [here](https://github.com/llvm/llvm-project/blob/dfec4ef1a2ff8dc6685594813bcf14c27db9d5bc/mlir/lib/Target/Cpp/TranslateToCpp.cpp#L871)
* Emitting a `!emitc.ptr<!emitc.array<...>>` fails with `cannot emit type '!emitc.array<...>'` as the logic of emitting types is now split between `emitType` and `emitVariableDeclaration`. This should be corrected to print a meaningful error message.

https://github.com/llvm/llvm-project/pull/83386


More information about the Mlir-commits mailing list