[Openmp-commits] [PATCH] D158072: [OpenMP][Archer] Add support for taskwait depend

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Aug 16 06:05:01 PDT 2023


protze.joachim created this revision.
protze.joachim added a reviewer: Hahnfeld.
protze.joachim added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
protze.joachim requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: jplehr, sstefan1.

At the moment Archer segfaults due to a null-pointer access, if an application uses taskwait with depend clause as used in the two new tests.
This patch cleans up the task_schedule function, moves semantic blocks into functions and replaces the if blocks by a single switch statement.
The switch statement will warn, when new enum values are added in OMPT and makes clear what code is executed for the different cases.

With free-agent tasks coming up in OpenMP 6.0, we should expect more null-pointer task_data, so additional null-pointer checks were added.
We also cannot rely on having an implicit task on the stack, so the BarrierIndex is stored during task creation.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158072

Files:
  openmp/tools/archer/ompt-tsan.cpp
  openmp/tools/archer/tests/races/taskwait-depend.c
  openmp/tools/archer/tests/task/taskwait-depend.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158072.550708.patch
Type: text/x-patch
Size: 13248 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230816/332c0326/attachment-0001.bin>


More information about the Openmp-commits mailing list