[flang-commits] [flang] [Flang][MLIR][OpenMP] Create a deferred declare target marking process for Bridge.cpp (PR #78502)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Thu Feb 22 03:42:09 PST 2024


================
@@ -5001,6 +5004,14 @@ class FirConverter : public Fortran::lower::AbstractConverter {
   /// lowering.
   void finalizeOpenMPLowering(
       const Fortran::semantics::Symbol *globalOmpRequiresSymbol) {
+    if (!ompDeferredDeclareTarget.empty()) {
+      bool deferredDeviceFuncFound =
+          Fortran::lower::markOpenMPDeferredDeclareTargetFunctions(
+              getModuleOp().getOperation(), ompDeferredDeclareTarget, *this);
+      if (!ompDeviceCodeFound)
+        ompDeviceCodeFound = deferredDeviceFuncFound;
----------------
skatrak wrote:

Nit: `ompDeviceCodeFound = ompDeviceCodeFound || deferredDeviceFuncFound` seems to me like slightly less convoluted logic, but feel free to ignore if you disagree.

https://github.com/llvm/llvm-project/pull/78502


More information about the flang-commits mailing list