[flang-commits] [flang] [OpenMP][Flang] Add "IsolatedFromAbove" and "OutlineableOpenMPOpInterface" trait to omp.target (PR #67164)

Akash Banerjee via flang-commits flang-commits at lists.llvm.org
Wed Sep 27 10:36:26 PDT 2023


TIFitis wrote:

> Not clear whether you are suggesting changes for this patch or explaining what is being done here. Wouldn't the ones that are block arguments be subject to implicit data-mapping rules (https://www.openmp.org/spec-html/5.2/openmpsu60.html)? Would it be better to make all of them block arguments and use an attribute in the `MapInfo` operation to distinguish the implicit ones?


@agozillon can probably comment here.

But I'll try to explain what is currently being done in this patch:

1. All variables that are accessed(read/write) inside the target region which haven't already been explicitly marked by the map clause are added to the `map_operands`, i.e, added to the `map_entries` along with the `MapInfoOp`, `DataBounds`, etc. as if they were part of the map clause to begin with. Only change is that the `map_type` for these are marked `implicit` and `literal`, instead of the regular map_types.
2. All map_operands, both explicit and implicit, are added as block arguments to the target regions. This is a requirement for the `IsolatedForAbove` trait, where any variable used(read/write) inside the region has to be a `block argument` to it and not defined outside.



https://github.com/llvm/llvm-project/pull/67164


More information about the flang-commits mailing list