[all-commits] [llvm/llvm-project] b7b375: [mlir][IR] Add `VectorTypeElementInterface` with `...

Matthias Springer via All-commits all-commits at lists.llvm.org
Tue Apr 8 10:22:07 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b7b3758e88f15a7ec27f212cd46e3dcf4e2f39f5
      https://github.com/llvm/llvm-project/commit/b7b3758e88f15a7ec27f212cd46e3dcf4e2f39f5
  Author: Matthias Springer <me at m-sp.org>
  Date:   2025-04-08 (Tue, 08 Apr 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMTypes.td
    M mlir/include/mlir/Dialect/Ptr/IR/PtrDialect.td
    M mlir/include/mlir/IR/BuiltinTypeInterfaces.td
    M mlir/include/mlir/IR/BuiltinTypes.td
    M mlir/lib/Dialect/LLVMIR/IR/LLVMMemorySlot.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm-interface.mlir
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Dialect/LLVMIR/invalid.mlir
    M mlir/test/Dialect/LLVMIR/mem2reg.mlir
    M mlir/test/Dialect/LLVMIR/opaque-ptr.mlir
    M mlir/test/Dialect/LLVMIR/roundtrip.mlir
    M mlir/test/Dialect/LLVMIR/types.mlir
    M mlir/test/IR/invalid-builtin-types.mlir
    M mlir/test/IR/test-verifiers-type.mlir
    M mlir/test/Target/LLVMIR/Import/constant.ll
    M mlir/test/Target/LLVMIR/Import/incorrect-scalable-vector-check.ll
    M mlir/test/Target/LLVMIR/Import/intrinsic.ll
    M mlir/test/Target/LLVMIR/llvmir-intrinsics.mlir
    M mlir/test/Target/LLVMIR/llvmir-invalid.mlir
    M mlir/test/Target/LLVMIR/llvmir-types.mlir
    M mlir/test/Target/LLVMIR/llvmir.mlir
    M mlir/test/Target/LLVMIR/opaque-ptr.mlir
    M mlir/test/python/ir/builtin_types.py

  Log Message:
  -----------
  [mlir][IR] Add `VectorTypeElementInterface` with `!llvm.ptr` (#133455)

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



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list