jdoerfert marked an inline comment as done.
jdoerfert added a comment.

> What is this buffer used for? [...]

I'll copy your comment and respond in this review D59424 
<https://reviews.llvm.org/D59424>.



================
Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:104
+///
+EXTERN int8_t __kmpc_target_region_kernel_init(ident_t *Ident, bool 
UseSPMDMode,
+                                               bool RequiresOMPRuntime,
----------------
ABataev wrote:
> If you're using `ident_t` `UseSPMDMode` and `RequiresOMPRuntime` parameters 
> are not needed anymore. They are passed in `ident_t` structure.
> If you're using ident_t UseSPMDMode and RequiresOMPRuntime parameters are not 
> needed anymore. They are passed in ident_t structure.

They are not in the TRegion interface, at least not by the TRegion code 
generation. If required, we can add that or require the 
`__kmpc_target_region_kernel_init` implementation to store the values in the 
`ident_t`. Regardless, we do not want to hide the variables in the `ident_t` 
because that would result in worse analysis results and cause optimizations to 
be harder. The main point of all these changes is, after all, to make 
optimizations easy. Given that we expect these functions to be inlined, there 
is also no harm done wrt. runtime costs.






Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59319



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

Reply via email to