[all-commits] [llvm/llvm-project] 1447ec: [mlir][AttrDefGen] Add support for specifying the ...

River Riddle via All-commits all-commits at lists.llvm.org
Thu Mar 4 13:04:27 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1447ec5182e61b117230ab39af6b53d08470aea3
      https://github.com/llvm/llvm-project/commit/1447ec5182e61b117230ab39af6b53d08470aea3
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/TableGen/AttrOrTypeDef.h
    M mlir/lib/TableGen/AttrOrTypeDef.cpp
    M mlir/test/lib/Dialect/Test/TestAttrDefs.td
    M mlir/test/lib/Dialect/Test/TestAttributes.cpp
    M mlir/test/lib/Dialect/Test/TestOps.td
    M mlir/test/mlir-tblgen/attrdefs.td
    M mlir/test/mlir-tblgen/testdialect-attrdefs.mlir
    M mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp

  Log Message:
  -----------
  [mlir][AttrDefGen] Add support for specifying the value type of an attribute

The value type of the attribute can be specified by either overriding the typeBuilder field on the AttrDef, or by providing a parameter of type `AttributeSelfTypeParameter`. This removes the need to define custom storage class constructors for attributes that have a value type other than NoneType.

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


  Commit: 2f37cdd5699f65cf6b9da615337cad6fdb012304
      https://github.com/llvm/llvm-project/commit/2f37cdd5699f65cf6b9da615337cad6fdb012304
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M mlir/include/mlir/IR/BuiltinAttributes.h
    A mlir/include/mlir/IR/BuiltinAttributes.td
    M mlir/include/mlir/IR/CMakeLists.txt
    M mlir/lib/IR/AttributeDetail.h
    M mlir/lib/IR/BuiltinAttributes.cpp
    M mlir/lib/IR/CMakeLists.txt
    M mlir/lib/IR/MLIRContext.cpp
    M mlir/lib/IR/OperationSupport.cpp

  Log Message:
  -----------
  [mlir][IR][NFC] Move a majority of the builtin attributes to ODS

Now that attributes can be generated using ODS, we can move the builtin attributes as well. This revision removes a majority of the builtin attributes with a few left for followup revisions. The attributes moved to ODS in this revision are: AffineMapAttr, ArrayAttr, DictionaryAttr, IntegerSetAttr, StringAttr, SymbolRefAttr, TypeAttr, and UnitAttr.

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


Compare: https://github.com/llvm/llvm-project/compare/c7f244b89714...2f37cdd5699f


More information about the All-commits mailing list