[PATCH] D69204: [OpenMP 5.0] - Extend defaultmap

Chi Chun Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 7 15:14:06 PST 2019


cchen marked an inline comment as done.
cchen added inline comments.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:4435-4437
+        if (DMIB == DMIB_alloc) Kind = OMPC_MAP_alloc;
+        else if (DMIB == DMIB_to) Kind = OMPC_MAP_to;
+        else if (DMIB == DMIB_from) Kind = OMPC_MAP_from;
----------------
ABataev wrote:
> Use `switch`
In this switch statement, I checked if the implicit map contains any "declare target link" to prove that for the normal case (no declare target link/to), DMIB_default and DMIB_default is unreachable for scalar and pointer.
However, this change is not quite right since I haven't added any extra ImplicitMap to deal with the case that ImplicitMap contains "declare target link" variable. (instead, I only create an extra field in ImplicitMap only so that I can demonstrate) And the reason why I'm hesitant to do so is that adding another two ImplicitMap only for "declare target link" might be a little be overkill?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69204/new/

https://reviews.llvm.org/D69204





More information about the cfe-commits mailing list