[LLVMdev] AMD IL Code Generator Backend for OpenCL

Villmow, Micah Micah.Villmow at amd.com
Mon Dec 12 08:57:59 PST 2011

For future reference, the zip file can also be downloaded from here:


From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Villmow, Micah
Sent: Monday, December 12, 2011 8:09 AM
To: LLVM Developers Mailing List
Subject: [LLVMdev] AMD IL Code Generator Backend for OpenCL

I am proud to announce that AMD is Open Sourcing AMDIL Code Generator for LLVM 2.9.  While this version is not for uptake into LLVM mainline, it does build and is compatible with LLVM 2.9.
This is the first step of the process, so I know there will be issues that show up. In the next few months, we will be providing more unit tests and an LLVM 3.0 compatible version, and finally a TOT version for inclusion into the tree. I look forward to any constructive feedback and will as answer any questions that I can.

For information on the sections of an AMD OpenCL  binary, please refer here:

The attached zip file provides the code generator, a patch to LLVM 2.9 that adds the target triple, and a few tests. Again this version is not for submission into the tree, but for people to experiment, examine and provide feedback outside of AMD.

Here are a list of the major known issues:
LLVM-IR that isn't generated from AMD's OpenCL frontend does not produce any AMDIL.
Testing is sparse(I'm working on it)
No support for most OpenCL math functions. It is up to the library writers to map from OpenCL function calls to AMDIL intrinsic.
Minor post processing of AMDIL is required for AMDIL source to be accepted by calclCompile/clBuildProgramFromBinary.
The source is the documentation.
Only supports compute shader generation.
The output of the code generator is currently compatible with OpenCL 1.0/1.1 only when processing LLVM-IR from OpenCL binaries generated by AMD APP SDK 2.5 or later with the clBuildProgramSource options "-fbin-llvmir -fno-bin-amdil -fno-bin-exe".

Micah Villmow
OpenCL GPU Compiler Engineer
AMD Inc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111212/676eb161/attachment.html>

More information about the llvm-dev mailing list