[flang-commits] [flang] [flang] add fir.box_offset operation (PR #73641)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Tue Nov 28 05:40:22 PST 2023
================
@@ -3036,4 +3036,43 @@ def fir_DeclareOp : fir_Op<"declare", [AttrSizedOperandSegments,
let hasVerifier = 1;
}
+def fir_BoxOffsetOp : fir_Op<"box_offset", [NoMemoryEffect]> {
+
+ let summary = "Get the address of a field in a fir.ref<fir.box>";
+
+ let description = [{
+ Given the address of a fir.box, compute the address of a field inside
+ the fir.box.
+ This allows keeping the actual runtime descriptor layout abstract in
+ FIR while providing access to the pointer addresses in the runtime
+ descriptor for OpenMP/OpenACC target mapping.
+
+ To avoid requiring too much about the fields that the runtime descriptor
----------------
tblah wrote:
```suggestion
To avoid requiring too much information about the fields that the runtime descriptor
```
https://github.com/llvm/llvm-project/pull/73641
More information about the flang-commits
mailing list