Skip to content

Commit 7641e42

Browse files
jprotzechichunchen
authored andcommitted
[OpenMP][Tools] Fix handling of initial-task-end
Latest OpenMP spec says parallel_data is NULL for initial/implicit-task-end. We nevertheless need to cleanup the ParallelData here, as there is no other callback for the end of the implicit parallel region. We can use the reference stored in the TaskData. Reviewed By: dreachem Differential Revision: https://reviews.llvm.org/D114005
1 parent 1a6aa8b commit 7641e42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openmp/tools/archer/ompt-tsan.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,10 +686,10 @@ static void ompt_tsan_implicit_task(ompt_scope_endpoint_t endpoint,
686686
#endif
687687
assert(Data->RefCount == 1 &&
688688
"All tasks should have finished at the implicit barrier!");
689-
Data->Delete();
690689
if (type & ompt_task_initial) {
691-
ToParallelData(parallel_data)->Delete();
690+
Data->Team->Delete();
692691
}
692+
Data->Delete();
693693
TsanFuncExit();
694694
break;
695695
}

0 commit comments

Comments
 (0)