[PATCH] D42711: AMDGPU: Support target triple OS component cuda

Yaxun Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 08:51:58 PST 2018


yaxunl added a comment.

In https://reviews.llvm.org/D42711#992555, @arsenm wrote:

> In https://reviews.llvm.org/D42711#992517, @yaxunl wrote:
>
> > I think the purpose of this patch is to get a similar usage of clang as nvptx when compiling CUDA, i.e., using cuda as OS instead of using amdhsa as OS and amdgiz as environment. This is more convenient for CUDA application developers since they just need to swap nvptx with amdgcn.
>
>
> This is a frontend driver question at most. The backend shouldn't need to be aware of this


There are various places in clang where selection is done based on OS==CUDA. If we don't use that OS, we need more complex logic in clang for such choices. I can try making changes to clang to make it work, but I suspect there may be places using OS==CUDA is necessary since it may be needed before parsing the language options.


https://reviews.llvm.org/D42711





More information about the llvm-commits mailing list