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
#endif
assert(Data->RefCount == 1 &&
"All tasks should have finished at the implicit barrier!");
- Data->Delete();
if (type & ompt_task_initial) {
- ToParallelData(parallel_data)->Delete();
+ Data->Team->Delete();
}
+ Data->Delete();
TsanFuncExit();
break;
}