[llvm-branch-commits] [openmp] r322560 - Merging r321964:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jan 16 07:18:22 PST 2018


Author: hans
Date: Tue Jan 16 07:18:22 2018
New Revision: 322560

URL: http://llvm.org/viewvc/llvm-project?rev=322560&view=rev
Log:
Merging r321964:
------------------------------------------------------------------------
r321964 | hahnfeld | 2018-01-07 08:54:36 -0800 (Sun, 07 Jan 2018) | 7 lines

Correct types of pointers to doacross_num_done

This field is defined as kmp_int32, so we should use neither
pointers to kmp_int64 nor 64 bit atomic instructions.
(Found while testing on a Raspberry Pi, 32 bit ARM)

Differential Revision: https://reviews.llvm.org/D41656
------------------------------------------------------------------------

Modified:
    openmp/branches/release_60/   (props changed)
    openmp/branches/release_60/runtime/src/kmp_csupport.cpp

Propchange: openmp/branches/release_60/
------------------------------------------------------------------------------
    svn:mergeinfo = /openmp/trunk:321964

Modified: openmp/branches/release_60/runtime/src/kmp_csupport.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/branches/release_60/runtime/src/kmp_csupport.cpp?rev=322560&r1=322559&r2=322560&view=diff
==============================================================================
--- openmp/branches/release_60/runtime/src/kmp_csupport.cpp (original)
+++ openmp/branches/release_60/runtime/src/kmp_csupport.cpp Tue Jan 16 07:18:22 2018
@@ -4032,7 +4032,7 @@ void __kmpc_doacross_post(ident_t *loc,
 }
 
 void __kmpc_doacross_fini(ident_t *loc, int gtid) {
-  kmp_int64 num_done;
+  kmp_int32 num_done;
   kmp_info_t *th = __kmp_threads[gtid];
   kmp_team_t *team = th->th.th_team;
   kmp_disp_t *pr_buf = th->th.th_dispatch;
@@ -4042,7 +4042,7 @@ void __kmpc_doacross_fini(ident_t *loc,
     KA_TRACE(20, ("__kmpc_doacross_fini() exit: serialized team %p\n", team));
     return; // nothing to do
   }
-  num_done = KMP_TEST_THEN_INC64((kmp_int64 *)pr_buf->th_doacross_info[1]) + 1;
+  num_done = KMP_TEST_THEN_INC32((kmp_int32 *)pr_buf->th_doacross_info[1]) + 1;
   if (num_done == th->th.th_team_nproc) {
     // we are the last thread, need to free shared resources
     int idx = pr_buf->th_doacross_buf_idx - 1;
@@ -4050,7 +4050,7 @@ void __kmpc_doacross_fini(ident_t *loc,
         &team->t.t_disp_buffer[idx % __kmp_dispatch_num_buffers];
     KMP_DEBUG_ASSERT(pr_buf->th_doacross_info[1] ==
                      (kmp_int64)&sh_buf->doacross_num_done);
-    KMP_DEBUG_ASSERT(num_done == (kmp_int64)sh_buf->doacross_num_done);
+    KMP_DEBUG_ASSERT(num_done == sh_buf->doacross_num_done);
     KMP_DEBUG_ASSERT(idx == sh_buf->doacross_buf_idx);
     __kmp_thread_free(th, CCAST(kmp_uint32 *, sh_buf->doacross_flags));
     sh_buf->doacross_flags = NULL;




More information about the llvm-branch-commits mailing list