Skip to content

Commit 10f575c

Browse files
committed
[OpenMP]Update use_device_clause lowering
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 b8d523a commit 10f575c

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
@@ -6369,14 +6369,14 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createTargetData(
63696369
if (!updateToLocation(Loc))
63706370
return InsertPointTy();
63716371

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

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

0 commit comments

Comments
 (0)