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

Brian Sumner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 09:07:02 PST 2018


b-sumner added a comment.

In https://reviews.llvm.org/D42711#993438, @yaxunl wrote:

> 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.


Changing those selections make sense to me since was are adding support for a completely new and different target.


https://reviews.llvm.org/D42711





More information about the llvm-commits mailing list