mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 13:16:49 +00:00

This commit extends the MLIR vector type to support pointer-like types such as `!llvm.ptr` and `!ptr.ptr`, as indicated by the newly added `VectorTypeElementInterface`. This makes the LLVM dialect closer to LLVM IR. LLVM IR already supports pointers as vector element type. Only integers, floats, pointers and index are valid vector element types for now. Additional vector element types may be added in the future after further discussions. The interface is still evolving and may eventually turn into one of the alternatives that were discussed on the RFC. This commit also disallows `!llvm.ptr` as an element type of `!llvm.vec`. This type exists due to limitations of the MLIR vector type. RFC: https://discourse.llvm.org/t/rfc-allow-pointers-as-element-type-of-vector/85360
Multi-Level Intermediate Representation
See https://mlir.llvm.org/ for more information.