OpenCL SPIR code generation

Hi all,

I am trying to compile a openCL code to SPIR with LLVM/Clang-3.2.

I see there is no backend for SPIR( which makes sense as SPIR is variant of LLVM-IR). However this leads me clueless how to configure LLVM/Clang for SPIR and what is the command I shall use to generate SPIR code from cl code.

Thanks,
Ankur

Hi Ankur,

SPIR generation is not yet fully supported in Clang. I’m working on this task, but there are still some missing parts.

The correct way to generate SPIR by Clang is adding the “-triple spir-unknown-unknown” or “-triple spir64-unknown-unknown” command line options when running clang.

Thanks

Guy Benyei

image001.png