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

Akash Banerjee via flang-commits flang-commits at lists.llvm.org
Thu Oct 12 09:12:09 PDT 2023


TIFitis wrote:


> I have another question. Are these bounds required for the map operation, then shouldn't they be part of the `map_info` operation or the variable being mapped?

Yes, and MapInfoOps are currently being created for them.

> Regarding the change you made, it does not look correct to have the `varPtr` field accepting an `index` value. Also for mapping, I imagine you would only map pointers or memory locations and not values.

I see what you're saying. Technically that is true and we shouldn't be mapping this. However, we still need a way to retain the "mapping" between the block_args and the original bounds, we need it later when lowering from MLIR to llvmIR. Adding them to the mapOperands is one way of retaining this information, otherwise, we could also add another field to the targetOp to store this information.

Let me know which you prefer.

> There is a pass to remove dead values and it is advertised as working for region arguments. Not sure whether it handles entry block arguments. https://reviews.llvm.org/rG0e98fb9fadb056e90f2649601914942765d7bf09

Thanks, but either way it is a simple check we can do when lowering from MLIR to llvmIR.



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


More information about the flang-commits mailing list