Skip to content

Commit da39596

Browse files
committed
handle review comments
1 parent 09f3a12 commit da39596

File tree

1 file changed

+5
-5
lines changed
  • flang/include/flang/Optimizer/Dialect

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3505,7 +3505,7 @@ def YieldOp : fir_Op<"yield",
35053505
}
35063506

35073507
def fir_LocalitySpecifierOp : fir_Op<"local", [IsolatedFromAbove]> {
3508-
let summary = "Provides declaration of [first]private logic.";
3508+
let summary = "Provides declaration of local and local_init logic.";
35093509
let description = [{
35103510
This operation provides a declaration of how to implement the
35113511
localization of a variable. The dialect users should provide
@@ -3519,7 +3519,7 @@ def fir_LocalitySpecifierOp : fir_Op<"local", [IsolatedFromAbove]> {
35193519
Examples:
35203520

35213521
* `local(x)` would not need any regions because no initialization is
3522-
required by the standard for i32 variables and this is not firstprivate.
3522+
required by the standard for i32 variables and this is not local_init.
35233523
```
35243524
fir.local {type = local} @x.localizer : i32
35253525
```
@@ -3538,16 +3538,16 @@ def fir_LocalitySpecifierOp : fir_Op<"local", [IsolatedFromAbove]> {
35383538
* `local(x)` for "allocatables" would be emitted as:
35393539
```
35403540
fir.local {type = local} @x.privatizer : !some.type init {
3541-
^bb0(%arg0: !some.pointer<!some.type>, %arg1: !some.pointer<!some.type>):
3541+
^bb0(%arg0: !fir.ref<!some.type>, %arg1: !fir.ref<!some.type>):
35423542
// initialize %arg1, using %arg0 as a mold for allocations.
35433543
// For example if %arg0 is a heap allocated array with a runtime determined
35443544
// length and !some.type is a runtime type descriptor, the init region
35453545
// will read the array length from %arg0, and heap allocate an array of the
35463546
// right length and initialize %arg1 to contain the array allocation and
35473547
// length.
3548-
fir.yield(%arg1 : !some.pointer<!some.type>)
3548+
fir.yield(%arg1 : !fir.ref<!some.type>)
35493549
} dealloc {
3550-
^bb0(%arg0: !some.pointer<!some.type>):
3550+
^bb0(%arg0: !fir.ref<!some.type>):
35513551
// ... deallocate memory allocated by the init region...
35523552
// In the example above, this will free the heap allocated array data.
35533553
fir.yield

0 commit comments

Comments
 (0)