This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Emit captured decls for target data if no devices were specified.
ClosedPublic

Authored by ABataev on Feb 28 2023, 11:20 AM.

Details

Summary

If use_device_ptr/use_device_addr clauses are used on target data
directive and no device was specified during the compilation, only host
part should be emitted. But it still required to emit captured decls for
partially mapped data fields.

Fixes https://github.com/llvm/llvm-project/issues/61053

Diff Detail

Event Timeline

ABataev created this revision.Feb 28 2023, 11:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2023, 11:20 AM
ABataev requested review of this revision.Feb 28 2023, 11:20 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: sstefan1. · View Herald Transcript
jhuber6 accepted this revision.Feb 28 2023, 11:32 AM

LG, thanks a lot for the quick fix.

clang/lib/CodeGen/CGStmtOpenMP.cpp
7294

nit. I prefer outer braces if and inner blocks have braces.

This revision is now accepted and ready to land.Feb 28 2023, 11:32 AM
jhuber6 retitled this revision from [OpenMP]Emit captured decls for target data if no devices were specified. to [OpenMP] Emit captured decls for target data if no devices were specified..Feb 28 2023, 11:33 AM
jhuber6 edited the summary of this revision. (Show Details)
This revision was landed with ongoing or failed builds.Feb 28 2023, 12:21 PM
This revision was automatically updated to reflect the committed changes.