[flang-commits] [flang] [Flang][OpenMP] Properly reserve space for entry block argument lists (NFC) (PR #111529)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Tue Oct 8 05:46:50 PDT 2024


https://github.com/skatrak created https://github.com/llvm/llvm-project/pull/111529

None

>From 02fcebfb202d97be2b3b53b58037877a85f0b3b6 Mon Sep 17 00:00:00 2001
From: Sergio Afonso <safonsof at amd.com>
Date: Tue, 8 Oct 2024 13:44:53 +0100
Subject: [PATCH] [Flang][OpenMP] Properly reserve space for entry block
 argument lists (NFC)

---
 flang/lib/Lower/OpenMP/OpenMP.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/flang/lib/Lower/OpenMP/OpenMP.cpp b/flang/lib/Lower/OpenMP/OpenMP.cpp
index b1a10960c8022e..1bb9b9e1b20267 100644
--- a/flang/lib/Lower/OpenMP/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP/OpenMP.cpp
@@ -612,7 +612,8 @@ static mlir::Block *genEntryBlock(lower::AbstractConverter &converter,
   unsigned numVars = args.inReduction.vars.size() + args.map.vars.size() +
                      args.priv.vars.size() + args.reduction.vars.size() +
                      args.taskReduction.vars.size() +
-                     args.useDeviceAddr.vars.size();
+                     args.useDeviceAddr.vars.size() +
+                     args.useDevicePtr.vars.size();
   types.reserve(numVars);
   locs.reserve(numVars);
 



More information about the flang-commits mailing list