[all-commits] [llvm/llvm-project] a0d449: [mlir][LLVM] Delete `getVectorElementType` (#134981)

Matthias Springer via All-commits all-commits at lists.llvm.org
Wed Apr 9 12:35:54 PDT 2025


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

  Changed paths:
    M mlir/docs/Dialects/LLVM.md
    M mlir/include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMTypes.h
    M mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
    M mlir/lib/Target/LLVMIR/ModuleImport.cpp
    M mlir/test/Dialect/LLVMIR/invalid.mlir
    M mlir/test/Target/LLVMIR/llvmir-invalid.mlir

  Log Message:
  -----------
  [mlir][LLVM] Delete `getVectorElementType` (#134981)

The LLVM dialect no longer has its own vector types. It uses
`mlir::VectorType` everywhere. Remove `LLVM::getVectorElementType` and
use `cast<VectorType>(ty).getElementType()` instead. This commit
addresses a
[comment](https://github.com/llvm/llvm-project/pull/133286#discussion_r2022192500)
on the PR that deleted the LLVM vector types.

Also improve vector type constraints by specifying the
`mlir::VectorType` C++ class, so that explicit casts to `VectorType` can
be avoided in some places.



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