This is an archive of the discontinued LLVM Phabricator instance.

[OPENMP50]Add device/kind context selector support.
ClosedPublic

Authored by ABataev on Nov 14 2019, 8:17 AM.

Details

Summary

Added basic parsing/sema support for device/kind context selector.

Diff Detail

Event Timeline

ABataev created this revision.Nov 14 2019, 8:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 14 2019, 8:17 AM
jdoerfert added inline comments.Nov 15 2019, 6:19 PM
clang/lib/CodeGen/CGOpenMPRuntime.cpp
11249

Nit: bool RHSIsSubsetOfLHS = isStrictSubset(RHS, LHS)
saves you a line later.

clang/test/OpenMP/declare_variant_device_kind_codegen.cpp
82

What is wrong about cpu, gpu together?

ABataev marked an inline comment as done.Nov 15 2019, 6:24 PM
ABataev added inline comments.
clang/test/OpenMP/declare_variant_device_kind_codegen.cpp
82

When several traits sre used, the logic and is applied. So, cpu,gpu means that the target is cpu and gpu at the same time.

ABataev updated this revision to Diff 229843.Nov 18 2019, 7:24 AM

Address comment

More comments?

This revision is now accepted and ready to land.Nov 21 2019, 9:11 AM
This revision was automatically updated to reflect the committed changes.
This comment was removed by jdoerfert.