[llvm] [mlir] [OpenMP][MLIR] Preserve to/from flags in mapper base entry for mappers (PR #159799)

Akash Banerjee via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 19 11:12:33 PDT 2025


TIFitis wrote:

> This looks fine to me, but is there a reason we can't emit the same entries from the frontend as we would if we explicitly mapped map(tofrom: r%real_arr)? As far as I'm aware that mapping should work upstream currently (if it doesn't then it will in the nearish future once the PRs I have up land and I can look into tidying up if at all possible). Just wondering as it'd be nice if we could avoid explicitly specialising the lowering for the mapper, if we can't its fine just curious :-)

Super thanks for the quick review.
We need the special handling for mappers because of map-type decay - [ref](https://www.openmp.org/spec-html/5.1/openmpsu119.html#x154-1870002.21.7.4). We need to propagate the map type information coming from the mapper as well as the parent so that when it reaches `OMPIRBuilder`, it can correctly apply the map-type decay logic.

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


More information about the llvm-commits mailing list