Skip to content

Commit 3bfb33b

Browse files
authored
[fir] Fix small format difference
Sync with upstream
1 parent a10a073 commit 3bfb33b

File tree

1 file changed

+11
-7
lines changed
  • flang/include/flang/Optimizer/Dialect

1 file changed

+11
-7
lines changed

flang/include/flang/Optimizer/Dialect/FIROps.td

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ class fir_IntegralSwitchTerminatorOp<string mnemonic,
601601
p.printOperand(getSelector());
602602
p << " : " << getSelector().getType() << " [";
603603
auto cases =
604-
(*this)->getAttrOfType<mlir::ArrayAttr>(getCasesAttr()).getValue();
604+
(*this)->getAttrOfType<mlir::ArrayAttr>(getCasesAttr()).getValue();
605605
auto count = getNumConditions();
606606
for (decltype(count) i = 0; i != count; ++i) {
607607
if (i)
@@ -625,7 +625,8 @@ class fir_IntegralSwitchTerminatorOp<string mnemonic,
625625
getSelector().getType().isa<mlir::IndexType>() ||
626626
getSelector().getType().isa<fir::IntegerType>()))
627627
return emitOpError("must be an integer");
628-
auto cases = (*this)->getAttrOfType<mlir::ArrayAttr>(getCasesAttr()).getValue();
628+
auto cases =
629+
(*this)->getAttrOfType<mlir::ArrayAttr>(getCasesAttr()).getValue();
629630
auto count = getNumDest();
630631
if (count == 0)
631632
return emitOpError("must have at least one successor");
@@ -888,7 +889,7 @@ def fir_EmboxOp : fir_Op<"embox", [NoSideEffect, AttrSizedOperandSegments]> {
888889

889890
def fir_ReboxOp : fir_Op<"rebox", [NoSideEffect, AttrSizedOperandSegments]> {
890891
let summary =
891-
"create a box given another box and (optional) dimension information";
892+
"create a box given another box and (optional) dimension information";
892893

893894
let description = [{
894895
Create a new boxed reference value from another box. This is meant to be
@@ -1513,13 +1514,16 @@ def fir_ArrayModifyOp : fir_Op<"array_modify", [AttrSizedOperandSegments,
15131514
```mlir
15141515
%s = fir.shape %n : (index) -> !fir.shape<1>
15151516
// Load the entire array 'a'.
1516-
%v = fir.array_load %a(%s) : (!fir.ref<!fir.array<?xf32>>, !fir.shape<1>) -> !fir.array<?xf32>
1517+
%v = fir.array_load %a(%s) : (!fir.ref<!fir.array<?xf32>>, !fir.shape<1>)
1518+
-> !fir.array<?xf32>
15171519
// Update the value of one of the array value's elements with a user
15181520
// defined assignment from %rhs.
15191521
%new = fir.do_loop %i = ... (%inner = %v) {
15201522
%rhs = ...
1521-
%addr, %r = fir.array_modify %inner, %i, %j : (!fir.array<?xf32>, index) -> fir.ref<f32>, !fir.array<?xf32>
1522-
fir.call @user_def_assign(%addr, %rhs) (fir.ref<f32>, fir.ref<!fir.type<SomeType>>) -> ()
1523+
%addr, %r = fir.array_modify %inner, %i, %j : (!fir.array<?xf32>,
1524+
index) -> fir.ref<f32>, !fir.array<?xf32>
1525+
fir.call @user_def_assign(%addr, %rhs) (fir.ref<f32>,
1526+
fir.ref<!fir.type<SomeType>>) -> ()
15231527
fir.result %r : !fir.ref<!fir.array<?xf32>>
15241528
}
15251529
fir.array_merge_store %v, %new to %a : !fir.ref<!fir.array<?xf32>>
@@ -1544,7 +1548,7 @@ def fir_ArrayModifyOp : fir_Op<"array_modify", [AttrSizedOperandSegments,
15441548
`:` functional-type(operands, results)
15451549
}];
15461550

1547-
let verifier = [{ return ::verify(*this); }];
1551+
let verifier = "return ::verify(*this);";
15481552
}
15491553

15501554
def fir_ArrayAccessOp : fir_Op<"array_access", [AttrSizedOperandSegments,

0 commit comments

Comments
 (0)