Page MenuHomePhabricator

[OpenCL] Fixes bug of missing OCL related metadata on the AMDGCN target
ClosedPublic

Authored by ashi1 on Jul 15 2016, 2:07 PM.

Details

Summary

Added the opencl.ocl.version metadata to be emitted with amdgcn. Created a static function emitOCLVerMD which is shared between triple spir and target amdgcn.

Also added new testcases to existing test file, spir_version.cl inside test/CodeGenOpenCL.

Diff Detail

Repository
rL LLVM

Event Timeline

ashi1 updated this revision to Diff 64181.Jul 15 2016, 2:07 PM
ashi1 retitled this revision from to [OpenCL] Fixes bug of missing OCL related metadata on the AMDGCN target.
ashi1 updated this object.
ashi1 added reviewers: yaxunl, Anastasia.
ashi1 set the repository for this revision to rL LLVM.
ashi1 added subscribers: nhaustov, tstellarAMD.
yaxunl accepted this revision.Jul 18 2016, 12:53 PM
yaxunl edited edge metadata.

LGTM. Thanks!

This revision is now accepted and ready to land.Jul 18 2016, 12:53 PM
Anastasia accepted this revision.Jul 19 2016, 6:47 AM
Anastasia edited edge metadata.

Apart from function renaming LGTM!

lib/CodeGen/TargetInfo.cpp
6839 ↗(On Diff #64181)

Could we rename to appendOpenCLVersionMD?

ashi1 updated this revision to Diff 64513.Jul 19 2016, 9:27 AM
ashi1 edited edge metadata.
ashi1 marked an inline comment as done.

Revised based on Anastasia's comments. Now using new function name appendOpenCLVersionMD(

This revision was automatically updated to reflect the committed changes.