[all-commits] [llvm/llvm-project] aec9e2: [mlir] introduce type constraints for operands of ...

ftynse via All-commits all-commits at lists.llvm.org
Fri Sep 4 01:02:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: aec9e20a3e9a4f25a5b1e07816c95f970300d918
      https://github.com/llvm/llvm-project/commit/aec9e20a3e9a4f25a5b1e07816c95f970300d918
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-09-04 (Fri, 04 Sep 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
    M mlir/test/Dialect/LLVMIR/invalid.mlir

  Log Message:
  -----------
  [mlir] introduce type constraints for operands of LLVM dialect operations

Historically, the operations in the MLIR's LLVM dialect only checked that the
operand are of LLVM dialect type without more detailed constraints. This was
due to LLVM dialect types wrapping LLVM IR types and having clunky verification
methods. With the new first-class modeling, it is possible to define type
constraints similarly to other dialects and use them to enforce some
correctness rules in verifiers instead of having LLVM assert during translation
to LLVM IR. This hardening discovered several issues where MLIR was producing
LLVM dialect operations that cannot exist in LLVM IR.

Depends On D85900

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D85901




More information about the All-commits mailing list