[Openmp-commits] [PATCH] D77609: [OpenMP] Added the support for unshackled task in RTL

Andrey Churbanov via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Aug 19 07:26:33 PDT 2020


AndreyChurbanov added inline comments.


================
Comment at: openmp/runtime/src/kmp.h:2239
   unsigned detachable : 1; /* 1 == can detach */
-  unsigned reserved : 9; /* reserved for compiler use */
+#if USE_UNSHACKLED_TASK
+  unsigned unshackled : 1; /* 1 == unshackled task */
----------------
This breaks the convention that the struct size is 32 bits.  The correct addition of extra flag under condition should look like:

  #if USE_UNSHACKLED_TASK
    unsigned unshackled : 1; /* 1 == unshackled task */
    unsigned reserved : 8; /* reserved for compiler use */
  #else
    unsigned reserved : 9; /* reserved for compiler use */
  #endif



================
Comment at: openmp/runtime/src/kmp.h:3072
   KMP_DEBUG_ASSERT(gtid >= KMP_GTID_MIN);
-  KMP_DEBUG_ASSERT(gtid < __kmp_threads_capacity);
+  KMP_DEBUG_ASSERT(gtid < __kmp_init_unshackled_threads
+                       ? 2 * __kmp_threads_capacity
----------------
This ASSERT now checks that __kmp_threads_capacity in not 0.  I doubt this was the intention.  Use brackets around  "?:" to check the gtid.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77609



More information about the Openmp-commits mailing list