[CUDA] Add getTargetFeatures for the NVPTX toolchain
authorJoseph Huber <jhuber6@vols.utk.edu>
Mon, 21 Mar 2022 20:32:12 +0000 (16:32 -0400)
committerJoseph Huber <jhuber6@vols.utk.edu>
Mon, 21 Mar 2022 20:32:36 +0000 (16:32 -0400)
commita3248e4b28ce09c3a749ecae5378dd0b3a8d42b1
tree4318b1ed3879f6647fa96569060156f0fd5aff8a
parent4275d7e65aa1ea239e19e5ce8415ddb795f0e767
[CUDA] Add getTargetFeatures for the NVPTX toolchain

The NVPTX toolchain uses target features to determine the PTX version to
use. However this isn't exposed externally like most other toolchain
specific target features are. Add this functionaliy in preparation for
using it in for OpenMP offloading.

Reviewed By: jdoerfert, tra

Differential Revision: https://reviews.llvm.org/D122089
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/Cuda.cpp
clang/lib/Driver/ToolChains/Cuda.h