[llvm-dev] Missing TargetPrefix for NVVM intrinsics

Justin Holewinski via llvm-dev
Fri, 01 Jul 2016 21:35:17 -0000

It's all historical, unfortunately. Before NVIDIA open sourced NVPTX, we had
the PTX target. The NVPTX target continued to accept the old PTX intrinsics to
ease compatibility. That was ~3.2, we can likely just get rid of the PTX
intrinsics now. The llvm.cuda intrinsic is an unfortunate naming quirk used
internally. This should be handled by llvm.nvvm.bar0, so it should be okay to
remove that intrinsic.

@jlebar, any issues on your end with removing all of the non-nvvm intrinsics?

> On Jul 1, 2016, at 3:01 PM, Justin Bogner <mail at justinbogner.com>
wrote:
>
> Justins:
>
> I noticed that the intrinsics in IntrinsicsNVVM don't specify a
> TargetPrefix. This seems like a simple omission, so I was going to
> simply throw a `let TargetPrefix = "nvvm" ` block around them,
but this
> doesn't quite work.
>
> There seem to be three prefixes that are used in this file. About 900
> are int_nvvm_*, 30 are int_ptx_*, and 1 is int_cuda. It isn't clear to
> me if this inconsistency is intentional or warranted - should these all
> be named int_nvvm_*? Is there a good reason to differentiate int_ptx_*?
> Why does __syncthreads map to int_cuda_syncthreads, rather than
> int_nvvm_syncthreads?
>
> I'm probably going to go ahead and add the TargetPrefix to the nvvm
> intrinsics, but I'm not familiar enough with NVPTX to know what to do
> with the others.
>
> Thanks,
> -- Justin
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may
contain
confidential information.  Any unauthorized review, use, disclosure or
distribution
is prohibited.  If you are not the intended recipient, please contact the sender
by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------