Questions regarding LLVM CUDA,

I’m very interested in that LLVM is now used by CUDA. But, exactly which parts use LLVM?

I downloaded CUDA 4.1 on Windows. So, nvcc.exe is now built with LLVM?

If so, where is the new CUDA compiler’s source files? I searched LLVM repository, but no CUDA related source code.

Could you somebody summarize how LLVM affects CUDA tool chains?

The 4th hit on google answers all of your questions:

Unfortunately the article isn’t researched very well (particularly for Anandtech standards). The article seems to be based entirely on the press release, which the author doesn’t seem to have fully understood at the time of writing the article.

The LLVM based compiler ([font=“Courier New”]cicc[/font]) replaces [font=“Courier New”]nvopencc[/font], not [font=“Courier New”]ptxas[/font] (which still remains a proprietary product). And CUDA 4.1 isn’t the first GPGPU compiler based on LLVM. In fact, every implementation of OpenCL so far uses LLVM, including Nvidia’s (which to me perfectly explains why Nvidia is switching compilers: It doesn’t seem to make sense to support two different compilers doing almost the same).

And it’s not true that Nvidia opens up the compiler source. If anything, it is keeping tighter control of it now because the license allows them to. nvopencc sources were freely downloadable for anyone, complying with the GPL license of the underlying Open64 compiler. To obtain the cicc source, you need to ask Nvidia.

To answer the original poster’s questions: [font=“Courier New”]nvcc[/font] is not built using LLVM, as [font=“Courier New”]nvcc[/font] is just a small driver to call the real tools with the right parameters. If compiling for compute capability 2.x, [font=“Courier New”]nvcc[/font] now calls [font=“Courier New”]cicc[/font], which is LLVM based. Compilation for compute capability 1.x is still performed by [font=“Courier New”]nvopencc[/font], which is based on Open64.

The way to obtain access to [font=“Courier New”]cicc[/font] source code is documented on this page.