OpenCL Changes in v3.9

Hi,

I am trying to migrate to CLang/LLVM v3.9, and I am no longer able to build some of my libraries. The code have uses the following:

#pragma OPENCL EXTENSION cl_clang_storage_class_specifiers : enable

#pragma OPENCL EXTENSION cl_khr_fp16 : enable

and these result in the following warnings:

warning: unsupported OpenCL extension ‘cl_clang_storage_class_specifiers’ - ignoring [-Wignored-pragmas]

warning: unsupported OpenCL extension ‘cl_khr_fp16’ - ignoring [-Wignored-pragmas]

This used to work, and a consequence of these not being recognised is that I get subsequent errors when I try to use the feature.

Is there a new way of saying this?

Thanks,

MartinO

Hi,

I am trying to migrate to CLang/LLVM v3.9, and I am no longer able to build
some of my libraries. The code have uses the following:

#pragma OPENCL EXTENSION cl_clang_storage_class_specifiers : enable

#pragma OPENCL EXTENSION cl_khr_fp16 : enable

Hi,

I think you need to implement: setSupportedOpenCLOpts() in your
target's TargetInfo implementation.

-Tom

Thanks Tom, I'll try that. I know that the OpenCL implementation has been
seeing major work, but I hadn't realised that there was something new I
would need to add to my target.

All the best,

  MartinO

That worked perfectly, thanks Tom

Clearly there needs to be a release note about this!

–paulr

Tom, do you know who to ping about this? Anastasia maybe?

This information is included in the notes: https://reviews.llvm.org/D23452

It has been committed a couple of days ago, but I don't see it updated online though http://llvm.org/pre-releases/3.9.0/rc1/tools/clang/docs/ReleaseNotes.html/.

Is there some extra step to do in order to have it public?

Thanks,
Anastasia

Great! I will build new html files for RC2, which I hope will happen
any day now.