[PATCH] D124721: [OpenMP] Allow compiling multiple target architectures with OpenMP
Joseph Huber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 30 16:04:40 PDT 2022
jhuber6 created this revision.
jhuber6 added reviewers: jdoerfert, JonChesterfield, yaxunl, saiislam, tianshilei1992, tra.
Herald added subscribers: kerbowa, guansong, jvesely.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added subscribers: cfe-commits, sstefan1, MaskRay.
Herald added a project: clang.
This patch adds support for OpenMP to use the `--offload-arch` and
`--no-offload-arch` options. Traditionally, OpenMP has only supported
compiling for a single architecture via the `-Xopenmp-target` option.
Now we can pass in a bound architecture and use that if given, otherwise
we default to the value of the `-march` option as before.
Note that this only applies the basic support, the OpenMP target runtime
does not yet know how to choose between multiple architectures.
Additionally other parts of the offloading toolchain (e.g. LTO) require
the `-march` option, these should be worked out later.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D124721
Files:
clang/lib/Driver/Driver.cpp
clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
clang/lib/Driver/ToolChains/Cuda.cpp
clang/test/Driver/amdgpu-openmp-toolchain-new.c
clang/test/Driver/openmp-offload-gpu-new.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124721.426254.patch
Type: text/x-patch
Size: 10026 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220430/2ebdc07d/attachment.bin>
More information about the cfe-commits
mailing list