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

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Mon Oct 16 09:54:11 PDT 2023


kiranchandramohan wrote:

> This example also shows that it is concerning making all mapping decisions so early in order to satisfy the IsolatedFromAbove property. Namely, this case would ideally be map(tofrom:a(11,22)) not a map(tofrom:a). Maybe it is indeed possible for this case - but consider a simple loop modifying `a(11,22+ii)`. Wouldn't it be great to just map what is needed? Hard to get this info at lowering. https://www.openmp.org/spec-html/5.2/openmpsu60.html
> 
> I wonder if it should be considered to add the trait IsolatedFromAbove sometime after lowering and after running the passes that will decide values passed by reference/value and those that decide the mapping actions for implicit data mapping attributes.

That is a good point. I guess, we could distinguish between `user-provided` mapping and `implicit` mapping by adding another field to `omp.map_info` and then subsequent passes in MLIR can update or replace the `implicit` mappings. The `implicit` mappings can start by assuming the worst case if there are variables involved.

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


More information about the flang-commits mailing list