jdoerfert added a comment.


> 6. Why do you access args_ for some parts and not for others? That said, 
> where does the hidden helper need access to the dependences anyway?
>
> there's type cast for depend objects from 'omp_depend_t' to 
> 'kmp_depend_info_t*', and the array of casted depend objects is consumed by 
> '__kmpc_omp_task_with_deps' , to make it safe, I just make larray of casted 
> depend objects to live longer, thus attached it to Args object.

So, you are saying the task_with_deps function does *not* copy the dependences 
and therefore the array has to outlive the function?



================
Comment at: openmp/libomptarget/src/private.h:248
+  kmp_depend_info_t* Depobjs;
+};
+    
----------------
As mentioned before. There is a lot of literal duplication here with no obvious 
benefit. Use a base class, or other schemes, to cut down on that. Also, the 
functions further above should share the same code.


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

https://reviews.llvm.org/D136103

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to