[all-commits] [llvm/llvm-project] 47b0a9: [ODS] Extra Concrete Declarations and Definitions ...

Amanda Tang via All-commits all-commits at lists.llvm.org
Wed Jul 12 08:46:37 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 47b0a9b9311ffdaab511c240de89b5da75b1252b
  Author: Amanda Tang <amandatang at google.com>
  Date:   2023-07-12 (Wed, 12 Jul 2023)

  Changed paths:
    M mlir/docs/Traits.md
    M mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
    M mlir/include/mlir/IR/AttrTypeBase.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/Interfaces/InferTypeOpInterface.h
    M mlir/include/mlir/Interfaces/InferTypeOpInterface.td
    M mlir/include/mlir/TableGen/Trait.h
    M mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
    M mlir/lib/Interfaces/InferTypeOpInterface.cpp
    M mlir/lib/TableGen/Trait.cpp
    M mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
    M mlir/tools/mlir-tblgen/OpClass.cpp
    M mlir/tools/mlir-tblgen/OpClass.h
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  [ODS] Extra Concrete Declarations and Definitions under Traits

Support extra concrete class declarations and definitions under NativeTrait that get injected into the class that specifies the trait. Extra declarations and definitions can be passed in as template arguments for NativeOpTraitNativeAttrTrait and NativeTypeTrait.

Usage examples of this feature include:

- Creating a wrapper Trait for authoring inferReturnTypes with the OpAdaptor by specifying necessary Op specific declarations and definitions directly in the trait
- Refactoring the InferTensorType trait

Reviewed By: jpienaar

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

More information about the All-commits mailing list