Skip to content

Commit 318a927

Browse files
committed
[flang][OpenMP] Implement HAS_DEVICE_ADDR clause
The HAS_DEVICE_ADDR indicates that the object(s) listed exists at an address that is a valid device address. Specifically, `has_device_addr(x)` means that (in C/C++ terms) `&x` is a device address. When entering a target region, `x` does not need to be allocated on the device, or have its contents copied over (in the absence of additional mapping clauses). Passing its address verbatim to the region for use is sufficient, and is the intended goal of the clause. Some Fortran objects use descriptors in their in-memory representation. If `x` had a descriptor, both the descriptor and the contents of `x` would be located in the device memory. However, the descriptors are managed by the compiler, and can be regenerated at various points as needed. The address of the effective descriptor may change, hence it's not safe to pass the address of the descriptor to the target region. Instead, the descriptor itself is always copied, but for objects like `x`, no further mapping takes place (as this keeps the storage pointer in the descriptor unchanged).
1 parent 55c76ea commit 318a927

File tree

20 files changed

+226
-89
lines changed

20 files changed

+226
-89
lines changed

flang/include/flang/Support/OpenMP-utils.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ struct EntryBlockArgsEntry {
3535
/// arguments associated to all clauses that can define them.
3636
struct EntryBlockArgs {
3737
llvm::ArrayRef<mlir::Value> hostEvalVars;
38+
EntryBlockArgsEntry hasDeviceAddr;
3839
EntryBlockArgsEntry inReduction;
3940
EntryBlockArgsEntry map;
4041
EntryBlockArgsEntry priv;
@@ -44,21 +45,21 @@ struct EntryBlockArgs {
4445
EntryBlockArgsEntry useDevicePtr;
4546

4647
bool isValid() const {
47-
return inReduction.isValid() && map.isValid() && priv.isValid() &&
48-
reduction.isValid() && taskReduction.isValid() &&
48+
return hasDeviceAddr.isValid() && inReduction.isValid() && map.isValid() &&
49+
priv.isValid() && reduction.isValid() && taskReduction.isValid() &&
4950
useDeviceAddr.isValid() && useDevicePtr.isValid();
5051
}
5152

5253
auto getSyms() const {
53-
return llvm::concat<const semantics::Symbol *const>(inReduction.syms,
54-
map.syms, priv.syms, reduction.syms, taskReduction.syms,
55-
useDeviceAddr.syms, useDevicePtr.syms);
54+
return llvm::concat<const semantics::Symbol *const>(hasDeviceAddr.syms,
55+
inReduction.syms, map.syms, priv.syms, reduction.syms,
56+
taskReduction.syms, useDeviceAddr.syms, useDevicePtr.syms);
5657
}
5758

5859
auto getVars() const {
59-
return llvm::concat<const mlir::Value>(hostEvalVars, inReduction.vars,
60-
map.vars, priv.vars, reduction.vars, taskReduction.vars,
61-
useDeviceAddr.vars, useDevicePtr.vars);
60+
return llvm::concat<const mlir::Value>(hasDeviceAddr.vars, hostEvalVars,
61+
inReduction.vars, map.vars, priv.vars, reduction.vars,
62+
taskReduction.vars, useDeviceAddr.vars, useDevicePtr.vars);
6263
}
6364
};
6465

flang/lib/Lower/OpenMP/ClauseProcessor.cpp

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -913,14 +913,34 @@ bool ClauseProcessor::processDepend(mlir::omp::DependClauseOps &result) const {
913913
}
914914

915915
bool ClauseProcessor::processHasDeviceAddr(
916-
mlir::omp::HasDeviceAddrClauseOps &result,
917-
llvm::SmallVectorImpl<const semantics::Symbol *> &isDeviceSyms) const {
918-
return findRepeatableClause<omp::clause::HasDeviceAddr>(
919-
[&](const omp::clause::HasDeviceAddr &devAddrClause,
920-
const parser::CharBlock &) {
921-
addUseDeviceClause(converter, devAddrClause.v, result.hasDeviceAddrVars,
922-
isDeviceSyms);
916+
lower::StatementContext &stmtCtx, mlir::omp::HasDeviceAddrClauseOps &result,
917+
llvm::SmallVectorImpl<const semantics::Symbol *> &hasDeviceSyms) const {
918+
// For HAS_DEVICE_ADDR objects, implicitly map the top-level entities.
919+
// Their address (or the whole descriptor, if the entity had one) will be
920+
// passed to the target region.
921+
std::map<Object, OmpMapParentAndMemberData> parentMemberIndices;
922+
bool clauseFound = findRepeatableClause<omp::clause::HasDeviceAddr>(
923+
[&](const omp::clause::HasDeviceAddr &clause,
924+
const parser::CharBlock &source) {
925+
mlir::Location location = converter.genLocation(source);
926+
llvm::omp::OpenMPOffloadMappingFlags mapTypeBits =
927+
llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_TO |
928+
llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_IMPLICIT;
929+
omp::ObjectList baseObjects;
930+
llvm::transform(clause.v, std::back_inserter(baseObjects),
931+
[&](const omp::Object &object) {
932+
if (auto maybeBase = getBaseObject(object, semaCtx))
933+
return *maybeBase;
934+
return object;
935+
});
936+
processMapObjects(stmtCtx, location, baseObjects, mapTypeBits,
937+
parentMemberIndices, result.hasDeviceAddrVars,
938+
hasDeviceSyms);
923939
});
940+
941+
insertChildMapInfoIntoParent(converter, semaCtx, stmtCtx, parentMemberIndices,
942+
result.hasDeviceAddrVars, hasDeviceSyms);
943+
return clauseFound;
924944
}
925945

926946
bool ClauseProcessor::processIf(

flang/lib/Lower/OpenMP/ClauseProcessor.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ class ClauseProcessor {
7171
bool processFinal(lower::StatementContext &stmtCtx,
7272
mlir::omp::FinalClauseOps &result) const;
7373
bool processHasDeviceAddr(
74+
lower::StatementContext &stmtCtx,
7475
mlir::omp::HasDeviceAddrClauseOps &result,
75-
llvm::SmallVectorImpl<const semantics::Symbol *> &isDeviceSyms) const;
76+
llvm::SmallVectorImpl<const semantics::Symbol *> &hasDeviceSyms) const;
7677
bool processHint(mlir::omp::HintClauseOps &result) const;
7778
bool processInclusive(mlir::Location currentLocation,
7879
mlir::omp::InclusiveClauseOps &result) const;

flang/lib/Lower/OpenMP/Clauses.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ std::optional<Object> getBaseObject(const Object &object,
159159
return Object{SymbolAndDesignatorExtractor::symbol_addr(comp->symbol()),
160160
ea.Designate(evaluate::DataRef{
161161
SymbolAndDesignatorExtractor::AsRvalueRef(*comp)})};
162-
} else if (base.UnwrapSymbolRef()) {
163-
return std::nullopt;
162+
} else if (auto *symRef = base.UnwrapSymbolRef()) {
163+
return Object{const_cast<semantics::Symbol *>(&**symRef), std::nullopt};
164164
}
165165
} else {
166166
assert(std::holds_alternative<evaluate::CoarrayRef>(ref.u) &&

flang/lib/Lower/OpenMP/OpenMP.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ static void bindEntryBlockArgs(lower::AbstractConverter &converter,
321321
// Process in clause name alphabetical order to match block arguments order.
322322
// Do not bind host_eval variables because they cannot be used inside of the
323323
// corresponding region, except for very specific cases handled separately.
324+
bindMapLike(args.hasDeviceAddr.syms, op.getHasDeviceAddrBlockArgs());
324325
bindPrivateLike(args.inReduction.syms, args.inReduction.vars,
325326
op.getInReductionBlockArgs());
326327
bindMapLike(args.map.syms, op.getMapBlockArgs());
@@ -1645,7 +1646,7 @@ static void genTargetClauses(
16451646
cp.processBare(clauseOps);
16461647
cp.processDepend(clauseOps);
16471648
cp.processDevice(stmtCtx, clauseOps);
1648-
cp.processHasDeviceAddr(clauseOps, hasDeviceAddrSyms);
1649+
cp.processHasDeviceAddr(stmtCtx, clauseOps, hasDeviceAddrSyms);
16491650
if (!hostEvalInfo.empty()) {
16501651
// Only process host_eval if compiling for the host device.
16511652
processHostEvalClauses(converter, semaCtx, stmtCtx, eval, loc);
@@ -2191,6 +2192,10 @@ genTargetOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
21912192
if (dsp.getAllSymbolsToPrivatize().contains(&sym))
21922193
return;
21932194

2195+
// These symbols are mapped individually in processHasDeviceAddr.
2196+
if (llvm::is_contained(hasDeviceAddrSyms, &sym))
2197+
return;
2198+
21942199
// Structure component symbols don't have bindings, and can only be
21952200
// explicitly mapped individually. If a member is captured implicitly
21962201
// we map the entirety of the derived type when we find its symbol.
@@ -2281,8 +2286,9 @@ genTargetOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
22812286

22822287
auto targetOp = firOpBuilder.create<mlir::omp::TargetOp>(loc, clauseOps);
22832288

2284-
llvm::SmallVector<mlir::Value> mapBaseValues;
2289+
llvm::SmallVector<mlir::Value> mapBaseValues, hasDeviceAddrBaseValues;
22852290
extractMappedBaseValues(clauseOps.mapVars, mapBaseValues);
2291+
extractMappedBaseValues(clauseOps.hasDeviceAddrVars, hasDeviceAddrBaseValues);
22862292

22872293
EntryBlockArgs args;
22882294
args.hostEvalVars = clauseOps.hostEvalVars;
@@ -2291,6 +2297,8 @@ genTargetOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
22912297
args.map.vars = mapBaseValues;
22922298
args.priv.syms = dsp.getDelayedPrivSymbols();
22932299
args.priv.vars = clauseOps.privateVars;
2300+
args.hasDeviceAddr.syms = hasDeviceAddrSyms;
2301+
args.hasDeviceAddr.vars = hasDeviceAddrBaseValues;
22942302

22952303
genBodyOfTargetOp(converter, symTable, semaCtx, eval, targetOp, args, loc,
22962304
queue, item, dsp);

flang/lib/Optimizer/OpenMP/MapInfoFinalization.cpp

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,19 @@ class MapInfoFinalizationPass
224224
}
225225

226226
/// Adjusts the descriptor's map type. The main alteration that is done
227-
/// currently is transforming the map type to `OMP_MAP_TO` where possible.
228-
/// This is because we will always need to map the descriptor to device
229-
/// (or at the very least it seems to be the case currently with the
230-
/// current lowered kernel IR), as without the appropriate descriptor
227+
/// currently is transforming the map type to `OMP_MAP_TO` where possible,
228+
/// plus adding OMP_MAP_ALWAYS flag. Descriptors will always be copied,
229+
/// even if the object was listed on the `has_device_addr` clause.
230+
/// This is because the descriptor can be rematerialized by the compiler,
231+
/// and so the address of the descriptor for a given object at one place in
232+
/// the code may differ from that address in another place. The contents
233+
/// of the descriptor (the base address in paticular) will remain unchanged
234+
/// though. Non-descriptor objects listed on the `has_device_addr` clause
235+
/// can be passed to the kernel by just passing their address without any
236+
/// remapping.
237+
/// The adding the OMP_MAP_TO flag is done because we will always need to
238+
/// map the descriptor to device, especially without device address clauses,
239+
/// as without the appropriate descriptor
231240
/// information on the device there is a risk of the kernel IR
232241
/// requesting for various data that will not have been copied to
233242
/// perform things like indexing. This can cause segfaults and
@@ -247,16 +256,25 @@ class MapInfoFinalizationPass
247256
mlir::omp::TargetUpdateOp>(target))
248257
return mapTypeFlag;
249258

250-
bool hasImplicitMap =
251-
(llvm::omp::OpenMPOffloadMappingFlags(mapTypeFlag) &
252-
llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_IMPLICIT) ==
259+
llvm::omp::OpenMPOffloadMappingFlags Implicit =
260+
llvm::omp::OpenMPOffloadMappingFlags(mapTypeFlag) &
253261
llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_IMPLICIT;
254262

255263
return llvm::to_underlying(
256-
hasImplicitMap
257-
? llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_TO |
258-
llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_IMPLICIT
259-
: llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_TO);
264+
llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_ALWAYS |
265+
llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_TO | Implicit);
266+
}
267+
268+
/// Check if the mapOp is present in the HasDeviceAddr clause on
269+
/// the userOp. Only applies to TargetOp.
270+
bool isHasDeviceAddr(mlir::omp::MapInfoOp mapOp, mlir::Operation *userOp) {
271+
if (auto targetOp = llvm::dyn_cast<mlir::omp::TargetOp>(userOp)) {
272+
for (mlir::Value hda : targetOp.getHasDeviceAddrVars()) {
273+
if (hda.getDefiningOp() == mapOp)
274+
return true;
275+
}
276+
}
277+
return false;
260278
}
261279

262280
mlir::omp::MapInfoOp genDescriptorMemberMaps(mlir::omp::MapInfoOp op,
@@ -268,8 +286,7 @@ class MapInfoFinalizationPass
268286
// TODO: map the addendum segment of the descriptor, similarly to the
269287
// base address/data pointer member.
270288
mlir::Value descriptor = getDescriptorFromBoxMap(op, builder);
271-
auto baseAddr = genBaseAddrMap(descriptor, op.getBounds(),
272-
op.getMapType().value_or(0), builder);
289+
273290
mlir::ArrayAttr newMembersAttr;
274291
mlir::SmallVector<mlir::Value> newMembers;
275292
llvm::SmallVector<llvm::SmallVector<int64_t>> memberIndices;
@@ -286,6 +303,12 @@ class MapInfoFinalizationPass
286303
// member information to now have one new member for the base address, or
287304
// we are expanding a parent that is a descriptor and we have to adjust
288305
// all of its members to reflect the insertion of the base address.
306+
//
307+
// If we're expanding a top-level descriptor for a map operation that
308+
// resulted from "has_device_addr" clause, then we want the base pointer
309+
// from the descriptor to be used verbatim, i.e. without additional
310+
// remapping. To avoid this remapping, simply don't generate any map
311+
// information for the descriptor members.
289312
if (!mapMemberUsers.empty()) {
290313
// Currently, there should only be one user per map when this pass
291314
// is executed. Either a parent map, holding the current map in its
@@ -296,6 +319,8 @@ class MapInfoFinalizationPass
296319
assert(mapMemberUsers.size() == 1 &&
297320
"OMPMapInfoFinalization currently only supports single users of a "
298321
"MapInfoOp");
322+
auto baseAddr = genBaseAddrMap(descriptor, op.getBounds(),
323+
op.getMapType().value_or(0), builder);
299324
ParentAndPlacement mapUser = mapMemberUsers[0];
300325
adjustMemberIndices(memberIndices, mapUser.index);
301326
llvm::SmallVector<mlir::Value> newMemberOps;
@@ -307,7 +332,9 @@ class MapInfoFinalizationPass
307332
mapUser.parent.getMembersMutable().assign(newMemberOps);
308333
mapUser.parent.setMembersIndexAttr(
309334
builder.create2DI64ArrayAttr(memberIndices));
310-
} else {
335+
} else if (!isHasDeviceAddr(op, target)) {
336+
auto baseAddr = genBaseAddrMap(descriptor, op.getBounds(),
337+
op.getMapType().value_or(0), builder);
311338
newMembers.push_back(baseAddr);
312339
if (!op.getMembers().empty()) {
313340
for (auto &indices : memberIndices)
@@ -448,6 +475,12 @@ class MapInfoFinalizationPass
448475
addOperands(useDevPtrMutableOpRange, target,
449476
argIface.getUseDevicePtrBlockArgsStart() +
450477
argIface.numUseDevicePtrBlockArgs());
478+
} else if (auto targetOp = llvm::dyn_cast<mlir::omp::TargetOp>(target)) {
479+
mlir::MutableOperandRange hasDevAddrMutableOpRange =
480+
targetOp.getHasDeviceAddrVarsMutable();
481+
addOperands(hasDevAddrMutableOpRange, target,
482+
argIface.getHasDeviceAddrBlockArgsStart() +
483+
argIface.numHasDeviceAddrBlockArgs());
451484
}
452485
}
453486

flang/lib/Support/OpenMP-utils.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ mlir::Block *genEntryBlock(mlir::OpBuilder &builder, const EntryBlockArgs &args,
1818

1919
llvm::SmallVector<mlir::Type> types;
2020
llvm::SmallVector<mlir::Location> locs;
21-
unsigned numVars = args.hostEvalVars.size() + args.inReduction.vars.size() +
22-
args.map.vars.size() + args.priv.vars.size() +
23-
args.reduction.vars.size() + args.taskReduction.vars.size() +
24-
args.useDeviceAddr.vars.size() + args.useDevicePtr.vars.size();
21+
unsigned numVars = args.hasDeviceAddr.vars.size() + args.hostEvalVars.size() +
22+
args.inReduction.vars.size() + args.map.vars.size() +
23+
args.priv.vars.size() + args.reduction.vars.size() +
24+
args.taskReduction.vars.size() + args.useDeviceAddr.vars.size() +
25+
args.useDevicePtr.vars.size();
2526
types.reserve(numVars);
2627
locs.reserve(numVars);
2728

@@ -34,6 +35,7 @@ mlir::Block *genEntryBlock(mlir::OpBuilder &builder, const EntryBlockArgs &args,
3435

3536
// Populate block arguments in clause name alphabetical order to match
3637
// expected order by the BlockArgOpenMPOpInterface.
38+
extractTypeLoc(args.hasDeviceAddr.vars);
3739
extractTypeLoc(args.hostEvalVars);
3840
extractTypeLoc(args.inReduction.vars);
3941
extractTypeLoc(args.map.vars);

flang/test/Integration/OpenMP/map-types-and-sizes.f90

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ subroutine mapType_array
3131
end subroutine mapType_array
3232

3333
!CHECK: @.offload_sizes{{.*}} = private unnamed_addr constant [4 x i64] [i64 0, i64 24, i64 8, i64 0]
34-
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [4 x i64] [i64 32, i64 281474976711169, i64 281474976711171, i64 281474976711187]
34+
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [4 x i64] [i64 32, i64 281474976711173, i64 281474976711171, i64 281474976711187]
3535
subroutine mapType_ptr
3636
integer, pointer :: a
3737
!$omp target
@@ -40,7 +40,7 @@ subroutine mapType_ptr
4040
end subroutine mapType_ptr
4141

4242
!CHECK: @.offload_sizes{{.*}} = private unnamed_addr constant [4 x i64] [i64 0, i64 24, i64 8, i64 0]
43-
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [4 x i64] [i64 32, i64 281474976711169, i64 281474976711171, i64 281474976711187]
43+
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [4 x i64] [i64 32, i64 281474976711173, i64 281474976711171, i64 281474976711187]
4444
subroutine mapType_allocatable
4545
integer, allocatable :: a
4646
allocate(a)
@@ -51,7 +51,7 @@ subroutine mapType_allocatable
5151
end subroutine mapType_allocatable
5252

5353
!CHECK: @.offload_sizes{{.*}} = private unnamed_addr constant [4 x i64] [i64 0, i64 24, i64 8, i64 0]
54-
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [4 x i64] [i64 32, i64 281474976710657, i64 281474976710659, i64 281474976710675]
54+
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [4 x i64] [i64 32, i64 281474976710661, i64 281474976710659, i64 281474976710675]
5555
subroutine mapType_ptr_explicit
5656
integer, pointer :: a
5757
!$omp target map(tofrom: a)
@@ -60,7 +60,7 @@ subroutine mapType_ptr_explicit
6060
end subroutine mapType_ptr_explicit
6161

6262
!CHECK: @.offload_sizes{{.*}} = private unnamed_addr constant [4 x i64] [i64 0, i64 24, i64 8, i64 0]
63-
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [4 x i64] [i64 32, i64 281474976710657, i64 281474976710659, i64 281474976710675]
63+
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [4 x i64] [i64 32, i64 281474976710661, i64 281474976710659, i64 281474976710675]
6464
subroutine mapType_allocatable_explicit
6565
integer, allocatable :: a
6666
allocate(a)
@@ -212,7 +212,7 @@ subroutine mapType_derived_explicit_nested_member_with_bounds
212212
end subroutine mapType_derived_explicit_nested_member_with_bounds
213213

214214
!CHECK: @.offload_sizes{{.*}} = private unnamed_addr constant [4 x i64] [i64 0, i64 48, i64 8, i64 0]
215-
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [4 x i64] [i64 32, i64 281474976710657, i64 281474976710659, i64 281474976710675]
215+
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [4 x i64] [i64 32, i64 281474976710661, i64 281474976710659, i64 281474976710675]
216216
subroutine mapType_derived_type_alloca()
217217
type :: one_layer
218218
real(4) :: i
@@ -233,7 +233,7 @@ subroutine mapType_derived_type_alloca()
233233
end subroutine
234234

235235
!CHECK: @.offload_sizes{{.*}} = private unnamed_addr constant [8 x i64] [i64 0, i64 40, i64 8, i64 0, i64 48, i64 8, i64 0, i64 4]
236-
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [8 x i64] [i64 32, i64 281474976710657, i64 281474976710659, i64 281474976710675, i64 281474976710657, i64 281474976710659, i64 281474976710675, i64 281474976710659]
236+
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [8 x i64] [i64 32, i64 281474976710661, i64 281474976710659, i64 281474976710675, i64 281474976710661, i64 281474976710659, i64 281474976710675, i64 281474976710659]
237237
subroutine mapType_alloca_derived_type()
238238
type :: one_layer
239239
real(4) :: i
@@ -256,7 +256,7 @@ subroutine mapType_alloca_derived_type()
256256
end subroutine
257257

258258
!CHECK: @.offload_sizes{{.*}} = private unnamed_addr constant [8 x i64] [i64 0, i64 40, i64 8, i64 0, i64 48, i64 8, i64 0, i64 4]
259-
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [8 x i64] [i64 32, i64 281474976710657, i64 281474976710659, i64 281474976710675, i64 281474976710657, i64 281474976710659, i64 281474976710675, i64 281474976710659]
259+
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [8 x i64] [i64 32, i64 281474976710661, i64 281474976710659, i64 281474976710675, i64 281474976710661, i64 281474976710659, i64 281474976710675, i64 281474976710659]
260260
subroutine mapType_alloca_nested_derived_type()
261261
type :: middle_layer
262262
real(4) :: i
@@ -287,7 +287,7 @@ subroutine mapType_alloca_nested_derived_type()
287287
end subroutine
288288

289289
!CHECK: @.offload_sizes{{.*}} = private unnamed_addr constant [4 x i64] [i64 0, i64 48, i64 8, i64 0]
290-
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [4 x i64] [i64 32, i64 281474976710657, i64 281474976710659, i64 281474976710675]
290+
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [4 x i64] [i64 32, i64 281474976710661, i64 281474976710659, i64 281474976710675]
291291
subroutine mapType_nested_derived_type_alloca()
292292
type :: middle_layer
293293
real(4) :: i
@@ -316,7 +316,7 @@ subroutine mapType_nested_derived_type_alloca()
316316
end subroutine
317317

318318
!CHECK: @.offload_sizes{{.*}} = private unnamed_addr constant [7 x i64] [i64 0, i64 64, i64 8, i64 0, i64 48, i64 8, i64 0]
319-
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [7 x i64] [i64 32, i64 281474976710657, i64 281474976710656, i64 281474976710672, i64 281474976710657, i64 281474976710659, i64 281474976710675]
319+
!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [7 x i64] [i64 32, i64 281474976710661, i64 281474976710656, i64 281474976710672, i64 281474976710661, i64 281474976710659, i64 281474976710675]
320320
subroutine mapType_nested_derived_type_member_idx()
321321
type :: vertexes
322322
integer :: test

0 commit comments

Comments
 (0)