This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
taking OpenCL C as a built-in lang of GCC?
- From: "Jianbin Fang" <jianbinfang at yeah dot net>
- To: gcc at gcc dot gnu dot org, gcc-help at gcc dot gnu dot org
- Date: Thu, 12 Sep 2019 22:48:55 +0800 (CST)
- Subject: taking OpenCL C as a built-in lang of GCC?
Hello Guys,
I am working on OpenCL for a couple of years, and would like to ask, as for GCC, why not taking OpenCL C as a built-in language in its front-end?
As we know, most OpenCL kernel compilers are built based on Clang/LLVM, and now, Clang has taken the OpenCL C language as one of its built-in languages. On the other hand, I found no OpenCL implementations which are based on GCC. Do you have any idea of the reasons?
I have this question because some devices may not have LLVM backends, but only have their backends in GCC. In such a case, a natural way is to add a new font-end into GCC, and build a kernel compiler based on the GCC compiling passes. What are the difficulties behind this idea?
Regards,
Jianbin