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

Akash Banerjee via flang-commits flang-commits at lists.llvm.org
Tue Oct 10 14:22:44 PDT 2023


TIFitis wrote:

@agozillon In the new test added that was initially shared by @jeanPerier , the bound is explicitly used in a mul op inside the region and is therefore also present as in a mul instruction inside the region when lowered to llvmIR. Thus we do need to map them as map_operands.

Most of the time however, the bounds are not explicitly used inside the region, in this case we will end up passing "unused" arguments to to the target execution. But, this is an optimisation problem. I don't know if there are existing optimisations in MLIR that remove unused block_args, should be fairly straightforward to add one.

Can you explain what you mean by map_operands being occluded?

When lowering from MLIR to llvmIR, anything that is part of the map_operands clause should be mapped as is, and there shouldn't be any variables inside the region which are unmapped, i.e, not present in the map_operands.



Thanks for sharing the tests, I'll run them tomorrow and update on their status.

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


More information about the flang-commits mailing list