[llvm-branch-commits] [flang] [MLIR][OpenMP] Add Lowering support for OpenMP Declare Mapper directive (PR #117046)

Krzysztof Parzyszek via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Dec 12 07:18:42 PST 2024


kparzysz wrote:

I looked at the clang code and it's not clear to me why they do it at runtime.  Mappers can refer to other mappers (for sub-objects), but all mappers and all type layouts should be present in (or obtainable from) the AST[1].  In other words, clang should be able to emit all the "expanded" map clauses (i.e. after application of the mappers) at compile-time.  It's possible that instead of emitting all that code inline, they put it in a runtime function to save code size.

[1] The mapper definition must be visible at the time of use in a clause, so all mappers (recursively) should be visible.

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


More information about the llvm-branch-commits mailing list