@@ -3505,7 +3505,7 @@ def YieldOp : fir_Op<"yield",
3505
3505
}
3506
3506
3507
3507
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.";
3509
3509
let description = [{
3510
3510
This operation provides a declaration of how to implement the
3511
3511
localization of a variable. The dialect users should provide
@@ -3519,7 +3519,7 @@ def fir_LocalitySpecifierOp : fir_Op<"local", [IsolatedFromAbove]> {
3519
3519
Examples:
3520
3520
3521
3521
* `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 .
3523
3523
```
3524
3524
fir.local {type = local} @x.localizer : i32
3525
3525
```
@@ -3538,16 +3538,16 @@ def fir_LocalitySpecifierOp : fir_Op<"local", [IsolatedFromAbove]> {
3538
3538
* `local(x)` for "allocatables" would be emitted as:
3539
3539
```
3540
3540
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>):
3542
3542
// initialize %arg1, using %arg0 as a mold for allocations.
3543
3543
// For example if %arg0 is a heap allocated array with a runtime determined
3544
3544
// length and !some.type is a runtime type descriptor, the init region
3545
3545
// will read the array length from %arg0, and heap allocate an array of the
3546
3546
// right length and initialize %arg1 to contain the array allocation and
3547
3547
// length.
3548
- fir.yield(%arg1 : !some.pointer <!some.type>)
3548
+ fir.yield(%arg1 : !fir.ref <!some.type>)
3549
3549
} dealloc {
3550
- ^bb0(%arg0: !some.pointer <!some.type>):
3550
+ ^bb0(%arg0: !fir.ref <!some.type>):
3551
3551
// ... deallocate memory allocated by the init region...
3552
3552
// In the example above, this will free the heap allocated array data.
3553
3553
fir.yield
0 commit comments