Page MenuHomePhabricator

Remove mandatory define of optional features macros for OpenCL C 3.0
Needs ReviewPublic

Authored by FMarno on Tue, Nov 8, 9:14 AM.

Details

Reviewers
Anastasia
Summary

A number of feature macros were being defined for OpenCL C 3.0 even though they are optional. I have removed these defines and updated the related tests. This should help users who are creating compilers for more limited environments.
This will also affect C++ for OpenCL 2021 since I believe its follows the same system of feature macros as OpenCL C 3.0.

This contribution is being made by Codeplay on behalf of Samsung.

Diff Detail

Event Timeline

FMarno created this revision.Tue, Nov 8, 9:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Nov 8, 9:14 AM
FMarno requested review of this revision.Tue, Nov 8, 9:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Nov 8, 9:14 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
svenvh added a subscriber: svenvh.Thu, Nov 24, 6:17 AM
svenvh added inline comments.
clang/include/clang/Basic/OpenCLExtensions.def
123

I am wondering why those features weren't added together with the other OpenCL 3.0 features; there wasn't any discussion around that in D95776. Perhaps it's because these don't affect the compiler behaviour directly? (but then neither does e.g. __opencl_c_atomic_order_acq_rel) Wondering if @Anastasia has any insights here.