This is an archive of the discontinued LLVM Phabricator instance.

Remove assert mandating you can only use SPIR target with OpenCL
ClosedPublic

Authored by sheredom on Apr 25 2016, 3:38 AM.

Details

Summary

Remove an assert mandating that OpenCL must be used with the SPIR target. We need to be able to use the SPIR target with non-OpenCL inputs, which worked perfectly well until commit 264241 introduced an assert that requires OpenCL be set in LangOpts.

Diff Detail

Event Timeline

sheredom updated this revision to Diff 54828.Apr 25 2016, 3:38 AM
sheredom retitled this revision from to Remove assert mandating you can only use SPIR target with OpenCL.
sheredom updated this object.
sheredom added reviewers: Anastasia, yaxunl, pxli168.
sheredom added a subscriber: cfe-commits.
Anastasia edited edge metadata.Apr 25 2016, 10:39 AM

LGTM, just wondering other languages will compile to SPIR too?

Anastasia accepted this revision.Apr 25 2016, 10:39 AM
Anastasia edited edge metadata.
This revision is now accepted and ready to land.Apr 25 2016, 10:39 AM
pxli168 accepted this revision.Apr 25 2016, 7:56 PM
pxli168 edited edge metadata.

LGTM.

sheredom added a comment.EditedApr 26 2016, 2:19 AM

So we build a bunch of internal libraries in a mix of OpenCL and C++, and then link them all together to create SPIR libraries that can be fed to calls to clLinkProgram and linked against user kernels.

I don't have commit rights to Clang - if the patch is ok to go could one of you bring the patch in for me?

Committed in r267561!

sheredom closed this revision.Apr 27 2016, 1:28 AM

Thanks!