[all-commits] [llvm/llvm-project] c4caa9: [mlir][tblgen] Generate builders with inferred ret...

Jeremy Furtek via All-commits all-commits at lists.llvm.org
Mon Apr 25 12:00:57 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c4caa90b15233b3f9512a479d84d6907fc11e7b8
      https://github.com/llvm/llvm-project/commit/c4caa90b15233b3f9512a479d84d6907fc11e7b8
  Author: jfurtek <jfurtek at nvidia.com>
  Date:   2022-04-25 (Mon, 25 Apr 2022)

  Changed paths:
    M mlir/docs/OpDefinitions.md
    M mlir/test/mlir-tblgen/op-decl-and-defs.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  [mlir][tblgen] Generate builders with inferred return types and unwrapped attributes

This diff causes mlir-tblgen to generate code for an additional builder for an
operation argument with a return type that can be inferred *AND* an attribute in
the argument list can be "unwrapped." (Previously, the unwrapped build function
was only generated for builders with explicit return types in separate or
aggregate form.) As an example, this builder might be used by code that creates
operations that implement the `SameOperandsAndResultType` interface. A test case
was created.

Reviewed By: jpienaar

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




More information about the All-commits mailing list