[Openmp-commits] [PATCH] D60223: [OpenMP][libomptarget] Enable requires flags for target libraries.

Alexey Bataev via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Apr 26 12:48:21 PDT 2019


ABataev added a comment.

Still, I think you can add some basic tests at least to test error messages and the conditions. See `llvm/projects/openmp/runtime/test/worksharing/for/kmp_sch_simd_guided.c` as an example.



================
Comment at: libomptarget/src/rtl.cpp:198
+  // will be checked for compatibility.
+  if (flags == OMP_REQ_UNDEFINED) {
+    FATAL_MESSAGE0(1,
----------------
This can be an assert, I don't think that the compiler should call it with this flag


================
Comment at: libomptarget/src/rtl.cpp:212
+  //  - unified_shared_memory
+  if ((RequiresFlags & OMP_REQ_REVERSE_OFFLOAD) ==
+      (flags & OMP_REQ_REVERSE_OFFLOAD)) {
----------------
Should it be `!=` here and in other places?


================
Comment at: libomptarget/src/rtl.cpp:215
+    FATAL_MESSAGE0(1,
+        "reverse_offload clause not used consistently!");
+  }
----------------
Better to emit it in terms of OpenMP pragmas and clauses here and in all other places


Repository:
  rOMP OpenMP

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

https://reviews.llvm.org/D60223





More information about the Openmp-commits mailing list