Page MenuHomePhabricator

opencl-c.h: CL3.0 generic address space
ClosedPublic

Authored by airlied on Jul 6 2021, 8:46 PM.

Details

Summary

This is one of the easier pieces of adding CL3.0 support.

Diff Detail

Event Timeline

airlied created this revision.Jul 6 2021, 8:46 PM
airlied requested review of this revision.Jul 6 2021, 8:46 PM
airlied retitled this revision from opencl-c.h: some CL3.0 compat bits to opencl-c.h: CL3.0 generic address space.Jul 6 2021, 8:48 PM
airlied edited the summary of this revision. (Show Details)
Anastasia added inline comments.Jul 7 2021, 5:51 AM
clang/lib/Headers/opencl-c.h
7341

This one is not generic address space pointer though but I think this bit is part of an #else block? If you could just re-upload as a full diff, this will make it less confusing to review: https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface

airlied updated this revision to Diff 356992.Jul 7 2021, 10:18 AM

updated to full diff.

airlied added inline comments.Jul 7 2021, 3:34 PM
clang/lib/Headers/opencl-c.h
7341

That's a good point, I was just adding the defined() bits to the endif to match the way other parts are done, however if there is an #else in the middle does this still make sense. I find having the defined comments is helpful for matching up wayward elses. The atomic changes are much more invasive so it would be good to know what we think is correct before I rework them all.

airlied updated this revision to Diff 357100.Jul 7 2021, 4:11 PM

I've dropped the SPIR change in the base header until things are resolved for library SPIR users to disable extension defines.

I've dropped the SPIR change in the base header until things are resolved for library SPIR users to disable extension defines.

Makes sense! But this is not a full diff again. Would it be possible to reupload it?

airlied updated this revision to Diff 358005.Jul 12 2021, 11:23 AM

full diff.

Anastasia accepted this revision.Jul 13 2021, 3:44 AM

LGTM! Thanks!

PS this patch is straightforward and doesn't seem to affect functionality for older standards provided that we set __opencl_c_generic_address_space correctly which is not in the scope of this change.

This revision is now accepted and ready to land.Jul 13 2021, 3:44 AM
This revision was landed with ongoing or failed builds.Jul 14 2021, 5:51 PM
This revision was automatically updated to reflect the committed changes.