llvm-project/clang/lib/Driver
Joseph Huber 509b631f84 [OpenMP] Try to Infer target triples using the offloading architecture
Currently we require the `-fopenmp-targets=` option to specify the
triple to use for the offloading toolchains, and the `-Xopenmp-target=`
option to specify architectures to a specific toolchain. The changes
made in D124721 allowed us to use `--offload-arch=` to specify multiple
target architectures. However, this can become combersome with many
different architectures. This patch introduces functinality that
attempts to deduce the target triple and architectures from the
offloading action. Currently we will deduce known GPU architectures when
only `-fopenmp` is specified.

This required a bit of a hack to cache the deduced architectures,
without this we would've just thrown an error when we tried to look up
the architecture again when generating the job. Normally we require the
user to manually specify the toolchain arguments, but here they would
confict unless we overrode them.

Depends on: D124721

Reviewed By: saiislam

Differential Revision: https://reviews.llvm.org/D125050
2022-05-06 16:57:18 -04:00
..
ToolChains [OpenMP] Try to Infer target triples using the offloading architecture 2022-05-06 16:57:18 -04:00
Action.cpp [OpenMP] Make clang argument handling for the new driver more generic 2022-04-29 09:14:35 -04:00
CMakeLists.txt [HLSL][clang][Driver] Support target profile command line option. 2022-04-15 14:18:18 -05:00
Compilation.cpp Revert "Rename llvm::array_lengthof into llvm::size to match std::size from C++17" 2022-01-26 16:55:53 +01:00
Distro.cpp Add support of the next Ubuntu (Ubuntu 22.04 - Jammy Jellyfish) 2021-10-23 23:55:50 +02:00
Driver.cpp [OpenMP] Try to Infer target triples using the offloading architecture 2022-05-06 16:57:18 -04:00
DriverOptions.cpp
Job.cpp [Clang] Own the CommandLineArgs in CodeGenOptions 2021-12-21 17:41:35 -05:00
Multilib.cpp [clang] Use llvm::erase_if (NFC) 2021-10-17 13:50:29 -07:00
OptionUtils.cpp
Phases.cpp
SanitizerArgs.cpp [PS5] Enable dead-stripping globals in ASan 2022-04-27 15:44:42 -07:00
Tool.cpp [clang][driver] NFC: Move InputInfo.h from lib to include 2021-07-27 09:17:39 +02:00
ToolChain.cpp [HLSL][clang][Driver] Support target profile command line option. 2022-04-15 14:18:18 -05:00
Types.cpp [flang][driver] Add support for consuming LLVM IR/BC files 2022-05-05 15:11:50 +00:00
XRayArgs.cpp Reapply [xray] add support for hexagon 2021-12-10 05:32:28 -08:00