[Openmp-commits] [PATCH] D60223: [OpenMP][libomptarget] Enable requires flags for target libraries.

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sat May 18 06:52:46 PDT 2019


Hahnfeld added a comment.

In this patch `__tgt_rtl_init_requires` does nothing. Do we really want to add the prototype now? If yes, are we sure that we won't need to pass more information in the future? Once we add it, the runtime library must maintain compatibility.

Moreover, I'm not sure if we should require plugins to implement the function if they don't need any addition checks. I'd propose to make this optional, ie look for the symbol via `dlsym` and disable the call if it's not found.



================
Comment at: libomptarget/test/offloading/requires.c:27-32
+  // Before the target region is registered, the requires registers the status
+  // of the requires clauses. Since there are no requires clauses in this file
+  // the flags state can only be OMP_REQ_NONE i.e. 1.
+
+  // This is the 2nd time this function is called so it should print the debug
+  // info belonging to the check.
----------------
This will only work if the test compiler already supports `requires`. What's wrong with calling `__tgt_register_requires` twice as I suggested offline?


Repository:
  rOMP OpenMP

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

https://reviews.llvm.org/D60223





More information about the Openmp-commits mailing list