[flang-commits] [flang] [llvm] [mlir] [Flang][OpenMP] Update MapInfoFinalization to use BlockArgs Interface and modify use_device_ptr/addr to be order independent (PR #113919)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Thu Oct 31 07:24:16 PDT 2024


================
@@ -2850,6 +2846,15 @@ static void genMapInfos(llvm::IRBuilderBase &builder,
   if (!moduleTranslation.getOpenMPBuilder()->Config.isTargetDevice())
     createAlteredByCaptureMap(mapData, moduleTranslation, builder);
 
+  auto useDevAndMapped = [&mapData](unsigned mapIdx) {
+    if (!mapData.IsAMapping[mapIdx])
----------------
skatrak wrote:

Nit: Negate condition and return early to reduce nesting.

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


More information about the flang-commits mailing list