[all-commits] [llvm/llvm-project] 7fe229: [mlir][ods] Allow specifying return types of builders

Jeff Niu via All-commits all-commits at lists.llvm.org
Fri Jul 15 18:00:50 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7fe2294e474bfcc4f9eee7828738d145836f9144
      https://github.com/llvm/llvm-project/commit/7fe2294e474bfcc4f9eee7828738d145836f9144
  Author: Jeff Niu <jeff at modular.com>
  Date:   2022-07-15 (Fri, 15 Jul 2022)

  Changed paths:
    M mlir/docs/AttributesAndTypes.md
    M mlir/include/mlir/IR/AttrTypeBase.td
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/include/mlir/TableGen/AttrOrTypeDef.h
    M mlir/lib/TableGen/AttrOrTypeDef.cpp
    M mlir/test/lib/Dialect/Test/TestAttrDefs.td
    M mlir/test/mlir-tblgen/attr-or-type-format.td
    M mlir/test/mlir-tblgen/attrdefs.td
    M mlir/test/mlir-tblgen/testdialect-attrdefs.mlir
    M mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
    M mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp

  Log Message:
  -----------
  [mlir][ods] Allow specifying return types of builders

This patch allows custom attribute and type builders to return
something other than the C++ type of the attribute or type.

This is useful for attributes or types that may perform extra work during
construction (e.g. canonicalization) that could result in a different
kind of attribute or type being returned.

Reviewed By: rriddle, lattner

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




More information about the All-commits mailing list