This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] Fix SPIR version generation.
ClosedPublic

Authored by echuraev on Dec 1 2016, 6:02 AM.

Diff Detail

Event Timeline

echuraev updated this revision to Diff 79901.Dec 1 2016, 6:02 AM
echuraev retitled this revision from to [OpenCL] Fix SPIR version generation..
echuraev updated this object.
echuraev added a reviewer: Anastasia.
echuraev added subscribers: cfe-commits, yaxunl, bader.
yaxunl added inline comments.Dec 1 2016, 7:24 AM
test/CodeGenOpenCL/spir_version.cl
21

why this is removed?

echuraev added inline comments.Dec 1 2016, 8:00 AM
test/CodeGenOpenCL/spir_version.cl
21

After my changes, value of SPIR version and OCL will be the same and so, it will be generate only one metadata (e.g. !1 = !{i32 1, i32 2}).
The same situation is for checking CL20 below.

yaxunl added inline comments.Dec 1 2016, 8:22 AM
test/CodeGenOpenCL/spir_version.cl
21

but line 19 still checking with OCL, shouldn't it be changed to the common version metadata shared between SPIR and OCL? How about rename SPIR in line 18 to VER?

echuraev updated this revision to Diff 80034.Dec 2 2016, 12:24 AM
echuraev marked 3 inline comments as done.
Anastasia added inline comments.Dec 2 2016, 7:11 AM
test/CodeGenOpenCL/spir_version.cl
22

Could we then use VER here too?

26

Btw, would it make sense to add for AMD targets?

CHECK-NOT: !opencl.spir.version
echuraev updated this revision to Diff 80229.Dec 4 2016, 10:55 PM
echuraev marked 2 inline comments as done.
Anastasia accepted this revision.Dec 5 2016, 8:26 AM
Anastasia edited edge metadata.

LGTM! Thanks!

This revision is now accepted and ready to land.Dec 5 2016, 8:26 AM
This revision was automatically updated to reflect the committed changes.