[all-commits] [llvm/llvm-project] dd0de4: [MLIR] Introduce constraint attributes for DenseAr...

lorenzo chelini via All-commits all-commits at lists.llvm.org
Thu Dec 1 06:15:47 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dd0de4dca92cd6affafb47f788b64e99187168f1
      https://github.com/llvm/llvm-project/commit/dd0de4dca92cd6affafb47f788b64e99187168f1
  Author: Lorenzo Chelini <l.chelini at icloud.com>
  Date:   2022-12-01 (Thu, 01 Dec 2022)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/IR/attribute.mlir
    M mlir/test/lib/Dialect/Test/TestOps.td

  Log Message:
  -----------
  [MLIR] Introduce constraint attributes for DenseArrayAttr

- `DenseArrayStrictlyPositive` all elements are required to be > 0.
  Returns true if the range is empty.

- `DenseArrayNonNegative` all elements are required to be >= 0. Returns
  true if the range is empty.

Both constraints will simplify verifier logic as we move from using `I64ArrayAttr` to `DenseI64ArrayAttr`.

Reviewed By: rriddle

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




More information about the All-commits mailing list