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

via flang-commits flang-commits at lists.llvm.org
Wed Oct 9 02:24:07 PDT 2024


Author: Sergio Afonso
Date: 2024-10-09T10:24:04+01:00
New Revision: e71ac933716dc9a747b93b73e899e50b421ebcde

URL: https://github.com/llvm/llvm-project/commit/e71ac933716dc9a747b93b73e899e50b421ebcde
DIFF: https://github.com/llvm/llvm-project/commit/e71ac933716dc9a747b93b73e899e50b421ebcde.diff

LOG: [Flang][OpenMP] Properly reserve space for entry block argument lists (NFC) (#111529)

This patch adds the size for `use_device_ptr`, which was missing.

Added: 
    

Modified: 
    flang/lib/Lower/OpenMP/OpenMP.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Lower/OpenMP/OpenMP.cpp b/flang/lib/Lower/OpenMP/OpenMP.cpp
index 1ce744457160b4..0735e40ea2ca7e 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