[Openmp-commits] [PATCH] D26058: Add more conditions to check whether task waiting is necessary in kmp_omp_taskwait()
Victor Campos via Openmp-commits
openmp-commits at lists.llvm.org
Mon Oct 31 13:35:43 PDT 2016
vhscampos added a reviewer: AndreyChurbanov.
vhscampos updated this revision to Diff 76466.
vhscampos added a comment.
Given that checking 'tasking_ser' is redundant, I removed it.
https://reviews.llvm.org/D26058
Files:
runtime/src/kmp_tasking.c
Index: runtime/src/kmp_tasking.c
===================================================================
--- runtime/src/kmp_tasking.c
+++ runtime/src/kmp_tasking.c
@@ -1480,13 +1480,13 @@
__kmp_itt_taskwait_starting( gtid, itt_sync_obj );
#endif /* USE_ITT_BUILD */
+ bool must_wait = ! taskdata->td_flags.team_serial && ! taskdata->td_flags.final;
+
#if OMP_45_ENABLED
- if ( ! taskdata->td_flags.team_serial || (thread->th.th_task_team != NULL && thread->th.th_task_team->tt.tt_found_proxy_tasks) )
-#else
- if ( ! taskdata->td_flags.team_serial )
+ must_wait = must_wait || (thread->th.th_task_team != NULL && thread->th.th_task_team->tt.tt_found_proxy_tasks);
#endif
+ if (must_wait)
{
- // GEH: if team serialized, avoid reading the volatile variable below.
kmp_flag_32 flag(&(taskdata->td_incomplete_child_tasks), 0U);
while ( TCR_4(taskdata -> td_incomplete_child_tasks) != 0 ) {
flag.execute_tasks(thread, gtid, FALSE, &thread_finished
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26058.76466.patch
Type: text/x-patch
Size: 1057 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20161031/89ada789/attachment.bin>
More information about the Openmp-commits
mailing list