[Openmp-commits] [openmp] 772fb97 - [OpenMP] Ignore schedule modifier in static scheduling

Hansang Bae via Openmp-commits openmp-commits at lists.llvm.org
Mon Oct 3 06:40:18 PDT 2022


Author: Hansang Bae
Date: 2022-10-03T08:29:57-05:00
New Revision: 772fb97c0b9bbc5fff2f5a2d45f959a66d5e5b6e

URL: https://github.com/llvm/llvm-project/commit/772fb97c0b9bbc5fff2f5a2d45f959a66d5e5b6e
DIFF: https://github.com/llvm/llvm-project/commit/772fb97c0b9bbc5fff2f5a2d45f959a66d5e5b6e.diff

LOG: [OpenMP] Ignore schedule modifier in static scheduling

The modifier bits in the schedule type is not used/supported in the
static scheduler, so it should be ignored.

Differential Revision: https://reviews.llvm.org/D134983

Added: 
    

Modified: 
    openmp/runtime/src/kmp_sched.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/kmp_sched.cpp b/openmp/runtime/src/kmp_sched.cpp
index acd75448d2967..a5ddb23bf0cd3 100644
--- a/openmp/runtime/src/kmp_sched.cpp
+++ b/openmp/runtime/src/kmp_sched.cpp
@@ -83,6 +83,9 @@ static void __kmp_for_static_init(ident_t *loc, kmp_int32 global_tid,
   KMP_PUSH_PARTITIONED_TIMER(OMP_loop_static);
   KMP_PUSH_PARTITIONED_TIMER(OMP_loop_static_scheduling);
 
+  // Clear monotonic/nonmonotonic bits (ignore it)
+  schedtype = SCHEDULE_WITHOUT_MODIFIERS(schedtype);
+
   typedef typename traits_t<T>::unsigned_t UT;
   typedef typename traits_t<T>::signed_t ST;
   /*  this all has to be changed back to TID and such.. */


        


More information about the Openmp-commits mailing list