[Openmp-commits] [openmp] 7641e42 - [OpenMP][Tools] Fix handling of initial-task-end

via Openmp-commits openmp-commits at lists.llvm.org
Thu Mar 31 10:34:26 PDT 2022


Author: Joachim Protze
Date: 2022-03-31T12:33:40-05:00
New Revision: 7641e42def02f228dc9e907094353c3ac55d5226

URL: https://github.com/llvm/llvm-project/commit/7641e42def02f228dc9e907094353c3ac55d5226
DIFF: https://github.com/llvm/llvm-project/commit/7641e42def02f228dc9e907094353c3ac55d5226.diff

LOG: [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

Added: 
    

Modified: 
    openmp/tools/archer/ompt-tsan.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/tools/archer/ompt-tsan.cpp b/openmp/tools/archer/ompt-tsan.cpp
index 7e384ddfeaa13..6bd117552b9af 100644
--- a/openmp/tools/archer/ompt-tsan.cpp
+++ b/openmp/tools/archer/ompt-tsan.cpp
@@ -686,10 +686,10 @@ static void ompt_tsan_implicit_task(ompt_scope_endpoint_t endpoint,
 #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;
   }


        


More information about the Openmp-commits mailing list