From 262289c1037745bf3dfe45941d9002ff80b77db8 Mon Sep 17 00:00:00 2001 From: Ye Luo Date: Sat, 7 Aug 2021 12:31:03 -0400 Subject: [PATCH] [OpenMP] mark target task untied OpenMP specification Tasking Terminology target task :A mergeable and untied task that ... Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D107686 --- openmp/runtime/src/kmp_tasking.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openmp/runtime/src/kmp_tasking.cpp b/openmp/runtime/src/kmp_tasking.cpp index f8cb56e..b3b6f3f 100644 --- a/openmp/runtime/src/kmp_tasking.cpp +++ b/openmp/runtime/src/kmp_tasking.cpp @@ -1434,11 +1434,12 @@ kmp_task_t *__kmpc_omp_target_task_alloc(ident_t *loc_ref, kmp_int32 gtid, size_t sizeof_shareds, kmp_routine_entry_t task_entry, kmp_int64 device_id) { - if (__kmp_enable_hidden_helper) { - auto &input_flags = reinterpret_cast(flags); + auto &input_flags = reinterpret_cast(flags); + // target task is untied defined in the specification + input_flags.tiedness = TASK_UNTIED; + + if (__kmp_enable_hidden_helper) input_flags.hidden_helper = TRUE; - input_flags.tiedness = TASK_UNTIED; - } return __kmpc_omp_task_alloc(loc_ref, gtid, flags, sizeof_kmp_task_t, sizeof_shareds, task_entry); -- 2.7.4