This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] Defines helper function for kernel language compatible OpenCL version
ClosedPublic

Authored by Topotuna on Aug 25 2021, 3:30 AM.

Details

Summary

This change defines a helper function getOpenCLCompatibleVersion()
inside LangOptions class. The function contains mapping between
C++ for OpenCL versions and their corresponding compatible OpenCL
versions. This mapping function should be updated each time a new
C++ for OpenCL language version is introduced. The helper function
is expected to simplify conditions on OpenCL C and C++ for OpenCL
versions inside compiler code.

Code refactoring performed.

Diff Detail

Event Timeline

Topotuna created this revision.Aug 25 2021, 3:30 AM
Topotuna requested review of this revision.Aug 25 2021, 3:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2021, 3:30 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Anastasia accepted this revision.Aug 26 2021, 10:11 AM

LGTM! Thanks!

This is a very nice clean up!

This revision is now accepted and ready to land.Aug 26 2021, 10:11 AM
This revision was landed with ongoing or failed builds.Aug 31 2021, 2:09 AM
This revision was automatically updated to reflect the committed changes.