[Beignet] [PATCH] Compile against upstream LLVM 3.3

Zhigang Gong zhigang.gong at linux.intel.com
Mon Apr 22 01:44:28 PDT 2013


Newbury,

It seems you need to redefine image2d_t/image3d_t/sampler/event_t to silent those errors.

compiler_clod:
/tmp/fileizyJvX.cl:198:38: error: expected identifier or '('
typedef __texture struct _image2d_t* image2d_t;
                                     ^
/tmp/fileizyJvX.cl:200:38: error: expected identifier or '('
typedef __texture struct _image3d_t* image3d_t;
                                     ^
/tmp/fileizyJvX.cl:201:25: error: expected identifier or '('
typedef __sampler uint* sampler_t;
                        ^
/tmp/fileizyJvX.cl:202:16: error: cannot combine with previous 'type-name' declaration specifier
typedef size_t event_t;


BTW,
As clang 3.3 hasn't been released so far, we don't have a plan to support it right now. And we did some test
With clang 3.3svn version, and found the it's not in a very stable stage. For example, some header files' locations
have been changed during the past several months and there maybe some other changes we are not aware of.

So we decide to support 3.1/3.2 and will consider to support 3.3 when it is officially released.

If you want to use beignet with LLVM 3.3svn at your machine, I'd be happy to provide help.  But the related patches
have been to be pending until the LLVM3.3's official release.

Thanks for your contribution.

> -----Original Message-----
> From:
> beignet-bounces+zhigang.gong=linux.intel.com at lists.freedesktop.org
> [mailto:beignet-bounces+zhigang.gong=linux.intel.com at lists.freedesktop.
> org] On Behalf Of Steven Newbury
> Sent: Monday, April 22, 2013 3:31 PM
> To: Zhigang Gong
> Cc: 'Boqun Feng'; beignet at lists.freedesktop.org
> Subject: Re: [Beignet] [PATCH] Compile against upstream LLVM 3.3
> 
> On Mon, 2013-04-22 at 15:05 +0800, Zhigang Gong wrote:
> 
> > My best guessing is that the latest llvm 3.3 svn introduces the
> "image2d_t"
> > and some related keywords in FE
> > which is incompatible with Beignet's current implementation. One
> > possible workaround is to redefine image2d_t to another name such as
> > the following :
> >
> > #define image2d_t  beignet_image2d_t
> >
> > And put this line at the beginning of the ocl_stdlib.h. It should work.
> 
> I should have provided more of the errors, attached full utests output.




More information about the Beignet mailing list