Skip to content

Commit 2cf36f0

Browse files
authored
[OpenMP]Update use_device_clause lowering (#101707)
This patch updates the use_device_ptr and use_device_addr clauses to use the mapInfoOps for lowering. This allows all the types that are handle by the map clauses such as derived types to also be supported by the use_device_clauses. This is patch 2/2 in a series of patches.
1 parent 9ba4103 commit 2cf36f0

File tree

4 files changed

+228
-183
lines changed

4 files changed

+228
-183
lines changed

llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6371,14 +6371,14 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createTargetData(
63716371
if (!updateToLocation(Loc))
63726372
return InsertPointTy();
63736373

6374+
Builder.restoreIP(CodeGenIP);
63746375
// Disable TargetData CodeGen on Device pass.
63756376
if (Config.IsTargetDevice.value_or(false)) {
63766377
if (BodyGenCB)
63776378
Builder.restoreIP(BodyGenCB(Builder.saveIP(), BodyGenTy::NoPriv));
63786379
return Builder.saveIP();
63796380
}
63806381

6381-
Builder.restoreIP(CodeGenIP);
63826382
bool IsStandAlone = !BodyGenCB;
63836383
MapInfosTy *MapInfo;
63846384
// Generate the code for the opening of the data environment. Capture all the

0 commit comments

Comments
 (0)