[Openmp-commits] [PATCH] D105715: [OpenMP] Minor improvement in task allocation
Hansang Bae via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Jul 12 09:41:40 PDT 2021
hbae updated this revision to Diff 357967.
hbae added a comment.
Undo the change that introduce `__kmp_task_alloc_impl` since the outcome may vary depending on the build compiler.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105715/new/
https://reviews.llvm.org/D105715
Files:
openmp/runtime/src/kmp_tasking.cpp
Index: openmp/runtime/src/kmp_tasking.cpp
===================================================================
--- openmp/runtime/src/kmp_tasking.cpp
+++ openmp/runtime/src/kmp_tasking.cpp
@@ -1344,13 +1344,7 @@
if (flags->proxy == TASK_FULL)
copy_icvs(&taskdata->td_icvs, &taskdata->td_parent->td_icvs);
- taskdata->td_flags.tiedness = flags->tiedness;
- taskdata->td_flags.final = flags->final;
- taskdata->td_flags.merged_if0 = flags->merged_if0;
- taskdata->td_flags.destructors_thunk = flags->destructors_thunk;
- taskdata->td_flags.proxy = flags->proxy;
- taskdata->td_flags.detachable = flags->detachable;
- taskdata->td_flags.hidden_helper = flags->hidden_helper;
+ taskdata->td_flags = *flags;
taskdata->encountering_gtid = gtid;
taskdata->td_task_team = thread->th.th_task_team;
taskdata->td_size_alloc = shareds_offset + sizeof_shareds;
@@ -1375,8 +1369,6 @@
taskdata->td_flags.complete = 0;
taskdata->td_flags.freed = 0;
- taskdata->td_flags.native = flags->native;
-
KMP_ATOMIC_ST_RLX(&taskdata->td_incomplete_child_tasks, 0);
// start at one because counts current task and children
KMP_ATOMIC_ST_RLX(&taskdata->td_allocated_child_tasks, 1);
@@ -1406,12 +1398,11 @@
if (taskdata->td_parent->td_flags.tasktype == TASK_EXPLICIT) {
KMP_ATOMIC_INC(&taskdata->td_parent->td_allocated_child_tasks);
}
- }
-
- if (flags->hidden_helper) {
- taskdata->td_flags.task_serial = FALSE;
- // Increment the number of hidden helper tasks to be executed
- KMP_ATOMIC_INC(&__kmp_unexecuted_hidden_helper_tasks);
+ if (flags->hidden_helper) {
+ taskdata->td_flags.task_serial = FALSE;
+ // Increment the number of hidden helper tasks to be executed
+ KMP_ATOMIC_INC(&__kmp_unexecuted_hidden_helper_tasks);
+ }
}
KA_TRACE(20, ("__kmp_task_alloc(exit): T#%d created task %p parent=%p\n",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105715.357967.patch
Type: text/x-patch
Size: 1882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210712/a7039de8/attachment.bin>
More information about the Openmp-commits
mailing list