Skip to content

Commit 804dc3d

Browse files
committed
🐛 Rename CtrlOp region to region
This will intentionally hide OneRegion::getRegion() which is exactly the same anyway. It avoids adding an additional method to the API that does exactly the same as getBodyRegion() and getRegion().
1 parent 9ae9af9 commit 804dc3d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mlir/include/mlir/Dialect/QC/IR/QCOps.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -948,8 +948,8 @@ def CtrlOp : QCOp<"ctrl",
948948
}];
949949

950950
let arguments = (ins Arg<Variadic<QubitType>, "the control qubits", [MemRead, MemWrite]>:$controls);
951-
let regions = (region SizedRegion<1>:$ctrlBodyRegion);
952-
let assemblyFormat = "`(` $controls `)` $ctrlBodyRegion attr-dict `:` type($controls)";
951+
let regions = (region SizedRegion<1>:$region);
952+
let assemblyFormat = "`(` $controls `)` $region attr-dict `:` type($controls)";
953953

954954
let extraClassDeclaration = [{
955955
[[nodiscard]] UnitaryOpInterface getBodyUnitary();

mlir/include/mlir/Dialect/QCO/IR/QCOOps.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,10 +1067,10 @@ def CtrlOp : QCOOp<"ctrl", traits =
10671067
let arguments = (ins Arg<Variadic<QubitType>, "the control qubits", [MemRead]>:$controls_in,
10681068
Arg<Variadic<QubitType>, "the target qubits", [MemRead]>:$targets_in);
10691069
let results = (outs Variadic<QubitType>:$controls_out, Variadic<QubitType>:$targets_out);
1070-
let regions = (region SizedRegion<1>:$ctrlBodyRegion);
1070+
let regions = (region SizedRegion<1>:$region);
10711071
let assemblyFormat = [{
10721072
`(` $controls_in `)` $targets_in
1073-
$ctrlBodyRegion attr-dict `:`
1073+
$region attr-dict `:`
10741074
`(` `{` type($controls_in) `}` ( `,` `{` type($targets_in)^ `}` )? `)`
10751075
`->`
10761076
`(` `{` type($controls_out) `}` ( `,` `{` type($targets_out)^ `}` )? `)`

0 commit comments

Comments
 (0)