[Openmp-commits] [PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Mar 15 11:50:20 PDT 2019

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.

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list