[flang-commits] [flang] [flang][MLIR][OpenMP] Extend delayed privatization for arrays (PR #85023)

via flang-commits flang-commits at lists.llvm.org
Wed Apr 24 05:37:45 PDT 2024


================
@@ -94,14 +94,12 @@ getExplicitLbounds(fir::FortranVariableOpInterface var) {
   return {};
 }
 
-static void
-genLboundsAndExtentsFromBox(mlir::Location loc, fir::FirOpBuilder &builder,
-                            hlfir::Entity boxEntity,
-                            llvm::SmallVectorImpl<mlir::Value> &lbounds,
-                            llvm::SmallVectorImpl<mlir::Value> *extents) {
+void hlfir::genLboundsAndExtentsFromBox(
+    mlir::Location loc, fir::FirOpBuilder &builder, mlir::Value boxEntity,
----------------
jeanPerier wrote:

hlfir tools are meant to operate on hlfir::Entity which brings guarantees about what the SSA value are (like the fact that it is possible to retrieve bounds/length parameter info from it).

It is up to the caller to pass the argument as hlfir::Entity{value} to indicate that they know what they are doing and that the value must fulfill those guarantees (i.e., cannot be a fir.ref<fir.array<?xT>> for instance.)
 

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


More information about the flang-commits mailing list