aboutsummaryrefslogtreecommitdiff
path: root/mlir/test/lib
diff options
context:
space:
mode:
authorJacques Pienaar <jpienaar@google.com>2020-09-29 16:47:21 -0700
committerJacques Pienaar <jpienaar@google.com>2020-09-29 16:47:21 -0700
commit4f0e0d92178d57137e26b1ac1be5f0409791912a (patch)
tree85291d1437e320f5f44f48e67a836fbce7f2ee44 /mlir/test/lib
parent26ee8aff2b85ee28a2b2d0b1860d878b512fbdef (diff)
downloadllvm-4f0e0d92178d57137e26b1ac1be5f0409791912a.zip
llvm-4f0e0d92178d57137e26b1ac1be5f0409791912a.tar.gz
llvm-4f0e0d92178d57137e26b1ac1be5f0409791912a.tar.bz2
[mlir] Remove more OpBuilder args which are now injected
NFC. Some small changes to make things more consistent but primarily avoiding old behavior without any further change.
Diffstat (limited to 'mlir/test/lib')
-rw-r--r--mlir/test/lib/Dialect/Test/TestOps.td18
1 files changed, 8 insertions, 10 deletions
diff --git a/mlir/test/lib/Dialect/Test/TestOps.td b/mlir/test/lib/Dialect/Test/TestOps.td
index 3743e39..6f3c8f5a 100644
--- a/mlir/test/lib/Dialect/Test/TestOps.td
+++ b/mlir/test/lib/Dialect/Test/TestOps.td
@@ -636,8 +636,7 @@ def OpFuncRef : TEST_Op<"op_funcref"> {
let description = [{
The "test.op_funcref" is a test op with a reference to a function symbol.
}];
- let builders = [OpBuilder<[{OpBuilder &builder, OperationState &state,
- FuncOp function}]>];
+ let builders = [OpBuilder<[{FuncOp function}]>];
}
// Pattern add the argument plus a increasing static number hidden in
@@ -1132,12 +1131,12 @@ def LegalOpB : TEST_Op<"legal_op_b">, Results<(outs I32)>;
def IllegalOpTerminator : TEST_Op<"illegal_op_terminator", [Terminator]>;
def IllegalOpWithRegion : TEST_Op<"illegal_op_with_region"> {
let skipDefaultBuilders = 1;
- let builders = [OpBuilder<"OpBuilder &builder, OperationState &state",
- [{ Region *bodyRegion = state.addRegion();
- OpBuilder::InsertionGuard g(builder);
- Block *body = builder.createBlock(bodyRegion);
- builder.setInsertionPointToEnd(body);
- builder.create<IllegalOpTerminator>(state.location);
+ let builders = [OpBuilder<"",
+ [{ Region *bodyRegion = $_state.addRegion();
+ OpBuilder::InsertionGuard g($_builder);
+ Block *body = $_builder.createBlock(bodyRegion);
+ $_builder.setInsertionPointToEnd(body);
+ $_builder.create<IllegalOpTerminator>($_state.location);
}]>];
}
def IllegalOpWithRegionAnchor : TEST_Op<"illegal_op_with_region_anchor">;
@@ -1176,8 +1175,7 @@ def TestRegionBuilderOp : TEST_Op<"region_builder">;
def TestReturnOp : TEST_Op<"return", [ReturnLike, Terminator]> {
let arguments = (ins Variadic<AnyType>);
let builders = [
- OpBuilder<"OpBuilder &builder, OperationState &state",
- [{ build(builder, state, {}); }]>
+ OpBuilder<"", [{ build($_builder, $_state, {}); }]>
];
}
def TestCastOp : TEST_Op<"cast">,