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

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jan 15 11:09:24 PST 2020


jdoerfert added a comment.

In D71989#1822326 <https://reviews.llvm.org/D71989#1822326>, @AndreyChurbanov wrote:

> > Having a copy function per type allows us to reuse it, otherwise we have one copy function per static task location (at worst). Either works for me I think.
>
> I also would be OK with either option.
>  But note that using per-type functions will require more additions to the interface, like:
>
>   (..., num_objects, array_of_copy_wrappers, array_of_desctuctor_wrappers, array_of_obj_offsets).
>
>
> Then the library can iterate over objects to copy-construct them, then iterate to destroy them after the task is complete. Without any possibility of inlining of any wrappers.
>
> Per-task function only needs two additions - copy_wrapper and destructor_wrapper, all other details can live inside them, including possible inlining of constructors and destructors.


Agreed. Interestingly, the "per-type" solution should allow you to implement the "per-task" version on top. You pretend all objects are part of a (task) meta-object which will copy them one by one.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71989





More information about the Openmp-commits mailing list