[all-commits] [llvm/llvm-project] 5fac87: [mlir] verify that operand/result_segment_sizes at...

ftynse via All-commits all-commits at lists.llvm.org
Tue Mar 23 10:26:53 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5fac87d1bcc40775edb5c1770331833a9e78f8e3
      https://github.com/llvm/llvm-project/commit/5fac87d1bcc40775edb5c1770331833a9e78f8e3
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2021-03-23 (Tue, 23 Mar 2021)

  Changed paths:
    M mlir/lib/IR/Operation.cpp
    M mlir/test/IR/traits.mlir

  Log Message:
  -----------
  [mlir] verify that operand/result_segment_sizes attributes have i32 element

This is an assumption that is made in numerous places in the code. In
particular, in the code generated by mlir-tblgen for operand/result accessors
in ops with attr-sized operand or result lists. Make sure to verify this
assumption.

Note that the operation traits are verified before running the custom op
verifier, which can expect the trait verifier to have passed, but some traits
may be verified before the AttrSizedOperand/ResultTrait and should not make
such assumptions.

Reviewed By: mehdi_amini

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




More information about the All-commits mailing list