[flang-commits] [flang] [flang][cuda] Preserve array lower bounds in implicit device-to-host transfer (PR #227824)
via flang-commits
flang-commits at lists.llvm.org
Thu Oct 1 06:11:08 PDT 2026
================
@@ -298,6 +298,16 @@ llvm::SmallVector<mlir::Value> genLowerbounds(mlir::Location loc,
fir::FirOpBuilder &builder,
mlir::Value shape, unsigned rank);
+/// Return a vector of the non-default (non-1) lower bounds for \p entity.
+/// For explicit-shape arrays the bounds are read from the DeclareOp shape.
+/// For assumed-shape and allocatable arrays the bounds are read from the
+/// runtime descriptor by generating fir.box_dims operations. Returns an
----------------
jeanPerier wrote:
I think the "How" is too much detail. It takes a builder, so it is clear it may generate code. And maintaining the description here is a burden (for instance you are not mentionning that it will generate a load of the fir.ref<fir.box> for POINTER/ALLOCATABLEs).
https://github.com/llvm/llvm-project/pull/227824
More information about the flang-commits
mailing list