[flang-commits] [flang] [flang] Lower Cray pointee references without a runtime call. (PR #230699)
via flang-commits
flang-commits at lists.llvm.org
Mon Oct 12 06:55:53 PDT 2026
================
@@ -1275,6 +1275,36 @@ def fir_BoxAddrOp
}];
}
+def fir_BoxSetAddrOp : fir_Op<"box_set_addr", []> {
+ let summary = "update the base address of a descriptor in memory";
+
+ let description = [{
+ Store the address `addr` into the base address field of the descriptor
+ held in memory at `box_ref`. All other fields of the descriptor (type,
+ rank, attributes, bounds, strides, element size) are left unchanged.
+
+ It is used to re-associate the descriptor of a Cray pointee with the
+ current value of its Cray pointer before each reference of the pointee.
+ Code generation lowers it to a single store into the descriptor, so the
+ update is visible to (and can be optimized by) LLVM, unlike a call to the
+ PointerAssociateScalar runtime function.
----------------
jeanPerier wrote:
nit: while this is useful in the commit message or in a rational doc, I think we should keep the operation description to what it is doing, not where it is used, otherwise, this gets outdated.
https://github.com/llvm/llvm-project/pull/230699
More information about the flang-commits
mailing list