diff options
author | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2018-11-14 13:49:41 +0000 |
---|---|---|
committer | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2018-11-14 13:49:41 +0000 |
commit | 82318c6f14e1d227a244720651562d81b7c9b18d (patch) | |
tree | 364354ec6ef576f4881615dc1c8002e1bd61e0fe /openmp/runtime/src/kmp_runtime.cpp | |
parent | a6a19c00d5058e0789777ee156def8d093108365 (diff) | |
download | bcm5719-llvm-82318c6f14e1d227a244720651562d81b7c9b18d.tar.gz bcm5719-llvm-82318c6f14e1d227a244720651562d81b7c9b18d.zip |
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
llvm-svn: 346862
Diffstat (limited to 'openmp/runtime/src/kmp_runtime.cpp')
-rw-r--r-- | openmp/runtime/src/kmp_runtime.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_runtime.cpp b/openmp/runtime/src/kmp_runtime.cpp index b861c06d2a5..f2e99565493 100644 --- a/openmp/runtime/src/kmp_runtime.cpp +++ b/openmp/runtime/src/kmp_runtime.cpp @@ -2649,6 +2649,8 @@ void __kmp_set_num_threads(int new_nth, int gtid) { 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); |