[PATCH] D71989: [OpenMP][IRBuilder][WIP] Prototype `omp task` support

Andrey Churbanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 13:48:54 PST 2020


AndreyChurbanov added a comment.

In D71989#2455515 <https://reviews.llvm.org/D71989#2455515>, @jdoerfert wrote:

> The required changes in addition to the diff have been discussed with @AndreyChurbanov in the comments above.

Actually the `__kmpc_task` function is going to be a bit more complicated in reality.

Because besides parameters for copy-construction + destruction of firstprivate objects, one will also need to pass to the `__kmpc_task`:

- priority value if any;
- affinity value(s) if any, probably single value is enough (this may be not supported yet, but apparently will be supported);
- address of event handle to be returned for detachable task, offset of the event handle in `shared_and_private_vars` so that the library can put corresponding address there if it is used inside the task code, or some indicator that library should not put the address there if it is not used inside the task code (e.g. negative offset?);
- offset of address of task structure in `shared_and_private_vars` for untied task, so that the compiler can generate `__kmpc_omp_task` calls to re-schedule partially executed task.

Also the `__kmpc_task` should better not call any `__kmpc_*` functions given recent activity of Joachim Protze (D92197 <https://reviews.llvm.org/D92197>) to eliminate all `__kmpc_*` calls from inside the library, and replace them with corresponding internal calls.  Otherwise OMPT cannot reliably determine entry to / exit from the runtime library, IINM.  But this might be a separate patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71989/new/

https://reviews.llvm.org/D71989



More information about the llvm-commits mailing list