[Openmp-commits] [openmp] r346862 - Fix for bugzilla https://bugs.llvm.org/show_bug.cgi?id=39137.
Andrey Churbanov via Openmp-commits
openmp-commits at lists.llvm.org
Wed Nov 14 05:49:41 PST 2018
Author: achurbanov
Date: Wed Nov 14 05:49:41 2018
New Revision: 346862
URL: http://llvm.org/viewvc/llvm-project?rev=346862&view=rev
Log:
Fix for bugzilla https://bugs.llvm.org/show_bug.cgi?id=39137.
Do not write to internal structure if it keeps same value.
Differential Revision: https://reviews.llvm.org/D54305
Modified:
openmp/trunk/runtime/src/kmp_runtime.cpp
Modified: openmp/trunk/runtime/src/kmp_runtime.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_runtime.cpp?rev=346862&r1=346861&r2=346862&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_runtime.cpp (original)
+++ openmp/trunk/runtime/src/kmp_runtime.cpp Wed Nov 14 05:49:41 2018
@@ -2649,6 +2649,8 @@ void __kmp_set_num_threads(int new_nth,
KMP_COUNT_VALUE(OMP_set_numthreads, new_nth);
thread = __kmp_threads[gtid];
+ if (thread->th.th_current_task->td_icvs.nproc == new_nth)
+ return; // nothing to do
__kmp_save_internal_controls(thread);
More information about the Openmp-commits
mailing list