llvm-project/mlir/test/mlir-tblgen
Alex Zinenko bb1d976feb [mlir][flang] use OpBuilder& instead of Builder* in <Op>::build methods
As we start defining more complex Ops, we increasingly see the need for
Ops-with-regions to be able to construct Ops within their regions in
their ::build methods. However, these methods only have access to
Builder, and not OpBuilder. Creating a local instance of OpBuilder
inside ::build and using it fails to trigger the operation creation
hooks in derived builders (e.g., ConversionPatternRewriter). In this
case, we risk breaking the logic of the derived builder. At the same
time, OpBuilder::create, which is by far the largest user of ::build
already passes "this" as the first argument, so an OpBuilder instance is
already available.

Update all ::build methods in all Ops in MLIR and Flang to take
"OpBuilder &" instead of "Builder *". Note the change from pointer and
to reference to comply with the common style in MLIR, this also ensures
all other users must change their ::build methods.

Differential Revision: https://reviews.llvm.org/D78713
2020-04-28 10:42:08 +02:00
..
dialect.td [ODS] Allow dialect to specify C++ namespaces 2019-05-20 13:49:27 -07:00
expect-symbol.td Use `not` to invert return code in expected to fail tests 2019-10-30 14:38:18 -07:00
llvm-intrinsics.td [mlir] NFC: fix trivial typo in documents 2020-03-30 00:34:23 +09:00
op-attribute.td [mlir][flang] use OpBuilder& instead of Builder* in <Op>::build methods 2020-04-28 10:42:08 +02:00
op-decl.td [mlir][flang] use OpBuilder& instead of Builder* in <Op>::build methods 2020-04-28 10:42:08 +02:00
op-derived-attribute.mlir [mlir][ods] Add materialize derived attribute method 2020-04-20 13:13:04 -07:00
op-format-spec.td [mlir][ODS] Add support for optional operands and results with a new Optional directive. 2020-04-10 14:12:06 -07:00
op-format.mlir [mlir][ODS] Add support for optional operands and results with a new Optional directive. 2020-04-10 14:12:06 -07:00
op-interface.td Skip generating C++ for "DeclareOpInterfaceMethods" in op interface gen. 2019-12-13 17:08:33 -08:00
op-operand.td [mlir] Optimize operand storage such that all operations can have resizable operand lists 2020-04-26 21:34:01 -07:00
op-result.td [mlir][flang] use OpBuilder& instead of Builder* in <Op>::build methods 2020-04-28 10:42:08 +02:00
op-side-effects.td [mlir][NFC] Move the interfaces and traits for side effects out of IR/ to Interfaces/ 2020-03-10 12:45:45 -07:00
pattern.mlir [mlir][drr] Allow specifying string in location 2020-04-10 12:43:22 -07:00
predicate.td [mlir][NFC] Replace mlir/Support/Functional.h with llvm equivalents. 2020-04-13 14:22:12 -07:00
return-types.mlir [mlir] Add reifyReturnShape to shaped type OpInterface 2020-02-28 08:41:18 -08:00
types.mlir [mlir][ods] Fix AnyInteger predicate 2020-03-09 20:12:15 +00:00