Skip to content

Commit

Permalink
[OpenMP]Update use_device_clause lowering (#101707)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
TIFitis authored Sep 4, 2024
1 parent 9ba4103 commit 2cf36f0
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 183 deletions.
2 changes: 1 addition & 1 deletion llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6371,14 +6371,14 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createTargetData(
if (!updateToLocation(Loc))
return InsertPointTy();

Builder.restoreIP(CodeGenIP);
// Disable TargetData CodeGen on Device pass.
if (Config.IsTargetDevice.value_or(false)) {
if (BodyGenCB)
Builder.restoreIP(BodyGenCB(Builder.saveIP(), BodyGenTy::NoPriv));
return Builder.saveIP();
}

Builder.restoreIP(CodeGenIP);
bool IsStandAlone = !BodyGenCB;
MapInfosTy *MapInfo;
// Generate the code for the opening of the data environment. Capture all the
Expand Down
Loading

0 comments on commit 2cf36f0

Please sign in to comment.