[LLVMdev] OpenCL backend for LLVM

Simon Moll simon.m.moll at googlemail.com
Mon Mar 5 13:00:32 PST 2012


Hi,

this is a follow-up on my email from august
(http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-August/042737.html).

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
applications.
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
point operations.

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

Kind regards,
Simon Moll




More information about the llvm-dev mailing list