[Openmp-commits] [PATCH] D83062: [OpenMP] Implement TR8 `present` map type modifier in runtime (2/2)

Joel E. Denny via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jul 7 17:20:16 PDT 2020


jdenny marked 3 inline comments as done.
jdenny added inline comments.


================
Comment at: openmp/libomptarget/src/omptarget.cpp:410
+        return OFFLOAD_FAIL;
+    }
 
----------------
grokos wrote:
> jdenny wrote:
> > jdoerfert wrote:
> > > Can we print the error in non debug mode as well? Is there a way we can provide more information on the location and variable?
> > I would prefer that too.  When I investigated this originally, I didn't find a good precedent in this runtime implementation, so I decided to be conservative.  Is there an existing diagnostic I should model this after, or is this a unique case?
> Unfortunately, libomptarget does not have access to source code location. `__tgt_` API functions do not have a related argument, like the `ident_t *loc` argument of `__kmpc_` API functions in libomp. Of course, if there is demand for such a feature we can implement it, although we would need to change *EVERY* API function in libomptarget.
> Unfortunately, libomptarget does not have access to source code location. `__tgt_` API functions do not have a related argument, like the `ident_t *loc` argument of `__kmpc_` API functions in libomp. Of course, if there is demand for such a feature we can implement it, although we would need to change *EVERY* API function in libomptarget.

That would be nice, but in a later patch.

For this patch, perhaps just a simple message clarifying that the error is due to the `present` modifier would be sufficient.  Should we define another macro next to `FATAL_MESSAGE` to print messages to stderr without exiting?  The exit happens later when `FATAL_MESSAGE` is actually called.



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

https://reviews.llvm.org/D83062





More information about the Openmp-commits mailing list