Caused test update as frontend now produces better IR due to copy elision.
Details
- Reviewers
kpet - Commits
- rZORG4ef89625cafe: [OpenCL] Switched CXX mode to be derived from C++17
rZORGbc5d0bb240e7: [OpenCL] Switched CXX mode to be derived from C++17
rG4ef89625cafe: [OpenCL] Switched CXX mode to be derived from C++17
rGbc5d0bb240e7: [OpenCL] Switched CXX mode to be derived from C++17
rG933e305ed909: [OpenCL] Switched CXX mode to be derived from C++17
rC360330: [OpenCL] Switched CXX mode to be derived from C++17
rL360330: [OpenCL] Switched CXX mode to be derived from C++17
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/clang/Frontend/LangStandards.def | ||
---|---|---|
162 ↗ | (On Diff #197996) | Suggest you add HexFloat as well. It is part of c++17 and all OpenCL versions. |
include/clang/Frontend/LangStandards.def | ||
---|---|---|
162 ↗ | (On Diff #197996) | Why only C++17? |
Per the OpenCL C++ 1.0 specification, section 2:
The OpenCL C++ programming language is based on the ISO/IEC JTC1 SC22 WG21 N 3690 language specification (a.k.a. C++14 specification).
I think it would be reasonable to permit changing the base C++ standard in OpenCL C++ mode, but we'd need a good reason to deviate from the behavior specified in the OpenCL C++ specification by default.
I am in discussion with Khronos about changing the directions for this spec and I believe some announcements will appear hopefully soon.
include/clang/Frontend/LangStandards.def | ||
---|---|---|
162 ↗ | (On Diff #197996) | I would love to have C++2a too but it's currently an experimental feature only and I can't see any timeline about when this will become production quality. As we are planning to release C++ for OpenCL in production quality during this year I am afraid it won't be possible to include C++2a at this point . Perhaps this is something we can do in the future. |
Indeed! There should be an option to pick the version of C++ the user wants for OpenCL.
Unfortunately, this is not easy to do. We document changes on top of other spec and we need to provide references. It would be a lot more work to refer to all different spec versions of C++. Also the development becomes more complicated as it needs testing and fixing against all different C++ versions. It makes sense to focus on one version and potentially provide an upgrade in the future. Also C++17 is a reasonable target most of developers should be happy with at this point.