public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* taking OpenCL C as a built-in lang of GCC?
@ 2019-09-12 14:49 Jianbin Fang
  2019-09-12 14:59 ` Jonathan Wakely
  2019-09-20 17:10 ` Jeff Law
  0 siblings, 2 replies; 4+ messages in thread
From: Jianbin Fang @ 2019-09-12 14:49 UTC (permalink / raw)
  To: gcc, gcc-help

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: taking OpenCL C as a built-in lang of GCC?
  2019-09-12 14:49 taking OpenCL C as a built-in lang of GCC? Jianbin Fang
@ 2019-09-12 14:59 ` Jonathan Wakely
  2019-09-20 17:10 ` Jeff Law
  1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Wakely @ 2019-09-12 14:59 UTC (permalink / raw)
  To: Jianbin Fang; +Cc: gcc, gcc-help

On Thu, 12 Sep 2019 at 15:49, Jianbin Fang <jianbinfang@yeah.net> wrote:
>
> Hello Guys,

Please don't cross-post to gcc@gcc.gnu.org and gcc-help@gcc.gnu.org,
pick one list, not both.


> 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 think the reason is that nobody has written such a front end.


> 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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: taking OpenCL C as a built-in lang of GCC?
  2019-09-12 14:49 taking OpenCL C as a built-in lang of GCC? Jianbin Fang
  2019-09-12 14:59 ` Jonathan Wakely
@ 2019-09-20 17:10 ` Jeff Law
  2019-09-20 19:17   ` Jason Merrill
  1 sibling, 1 reply; 4+ messages in thread
From: Jeff Law @ 2019-09-20 17:10 UTC (permalink / raw)
  To: Jianbin Fang, gcc, gcc-help

On 9/12/19 8:48 AM, Jianbin Fang wrote:
> 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?
There's no inherent reason why we don't support OpenCL C.  Someone would
just need to write a suitable front-end for GCC and contribute it.

jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: taking OpenCL C as a built-in lang of GCC?
  2019-09-20 17:10 ` Jeff Law
@ 2019-09-20 19:17   ` Jason Merrill
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Merrill @ 2019-09-20 19:17 UTC (permalink / raw)
  To: Jeff Law; +Cc: Jianbin Fang, gcc Mailing List, gcc-help

On Fri, Sep 20, 2019, 1:10 PM Jeff Law <law@redhat.com> wrote:

> On 9/12/19 8:48 AM, Jianbin Fang wrote:
> > 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?
> There's no inherent reason why we don't support OpenCL C.  Someone would
> just need to write a suitable front-end for GCC and contribute it.
>

Or a patch to add it to the C front end.

>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-20 19:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-12 14:49 taking OpenCL C as a built-in lang of GCC? Jianbin Fang
2019-09-12 14:59 ` Jonathan Wakely
2019-09-20 17:10 ` Jeff Law
2019-09-20 19:17   ` Jason Merrill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).