[all-commits] [llvm/llvm-project] 94c479: [mlir] Add `Print(Attr|Type)Qualified` trait

Markus Böck via All-commits all-commits at lists.llvm.org
Fri Feb 2 04:06:20 PST 2024


  Branch: refs/heads/users/zero9178/qualified-trait
  Home:   https://github.com/llvm/llvm-project
  Commit: 94c47995dff5a3a57b7066676dfe40b1caf713dc
      https://github.com/llvm/llvm-project/commit/94c47995dff5a3a57b7066676dfe40b1caf713dc
  Author: Markus Böck <markus.boeck02 at gmail.com>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M mlir/include/mlir/IR/AttrTypeBase.td
    M mlir/include/mlir/IR/Attributes.h
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/include/mlir/IR/Types.h
    A mlir/test/IR/always-qualified-trait.mlir
    M mlir/test/lib/Dialect/Test/TestAttrDefs.td
    M mlir/test/lib/Dialect/Test/TestOps.td
    M mlir/test/lib/Dialect/Test/TestTypeDefs.td

  Log Message:
  -----------
  [mlir] Add `Print(Attr|Type)Qualified` trait

This PR adds a new trait to attributes and types that force the use of the qualified syntax for attributes and types. More concretely, any attribute or type with the trait must be parsed and printed with the `dialect.mnemonic` prefix.

The motivation for this PR is the dependent PR where it is used to retain backwards-compatibility of syntax, but downstream projects may also use the trait if the subjectively prefer the verbose syntax.




More information about the All-commits mailing list