[LLVMdev] OpenCL backend for LLVM
simon.m.moll at googlemail.com
Mon Mar 5 15:00:32 CST 2012
this is a follow-up on my email from august
i have, finally, released my OpenCL backend and control-flow
restructuring framework for LLVM (AST-Extractor, or short axtor). The
framework restructures function CFGs such that they can be expressed
entirely without GOTOs or switch/loop-trickery. Hence, making it
possible to emit source-code for strictly control-flow structured
languages (OpenCL, GLSL). The code includes a drop-in OpenCL driver that
allows source-to-source OpenCL code transformations on existing OpenCL
The OpenCL backend has been under development for a while now and was
tested against the NVIDIA, AMD and Rodinia demo/benchmark suites with
recent NVIDIA/AMD drivers. Results for NVIDIA and AMD show, with few
exceptions, that the source-to-source-loop does not introduce any
performance penalty on the generated kernels (known exception: AES on
recent AMD drivers),
However, kernels with sampler types are currently unsupported and the
source-to-source-loop may introduce slight imprecisions to floating
The project builds against the current SVN version of LLVM and Clang.
The GLSL backend has been lacking some attention (still at 2.9) and will
be ported later to LLVM-svn.
To have a look at the source, go to https://bitbucket.org/gnarf/axtor/
where it is hosted under the GPL license.
Please get back to me, if you have any questions or want to work on the
code (however, i won't be able to regulary check on my emails before
April but you will get your reply sooner or later).
More information about the LLVMdev