[CUDA][HIP] Support '--offload-arch=native' for the new driver
authorJoseph Huber <jhuber6@vols.utk.edu>
Thu, 5 Jan 2023 18:42:41 +0000 (12:42 -0600)
committerJoseph Huber <jhuber6@vols.utk.edu>
Wed, 11 Jan 2023 16:30:34 +0000 (10:30 -0600)
commitfada90286008b52a59ff13b15675032787501001
treeb0c3258a2d491a374652700cf6b2a3ac4dee5b31
parent56ebfca4bcc0e7a54989ad7aea5395b27f67e373
[CUDA][HIP] Support '--offload-arch=native' for the new driver

This patch applies the same handling for the `--offload-arch=native'
string to the new driver. The support for OpenMP will require some extra
logic to infer the triples from the derived architecture strings.

Depends on D141051

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D141078
clang/lib/Driver/Driver.cpp
clang/test/Driver/amdgpu-hip-system-arch.c
clang/test/Driver/nvptx-cuda-system-arch.c
clang/test/Driver/openmp-offload-infer.c