Page MenuHomePhabricator

[OpenCL] AMDGCN target will generate images in constant address space
ClosedPublic

Authored by ashi1 on Jul 19 2016, 11:11 AM.

Details

Summary

Allows AMDGCN target to generate images (such as %opencl.image2d_t) in constant address space.
Images will still be generated in global address space by default.

Added tests to existing opencl-types.cl in test\CodeGenOpenCL

Diff Detail

Repository
rL LLVM

Event Timeline

ashi1 updated this revision to Diff 64526.Jul 19 2016, 11:11 AM
ashi1 retitled this revision from to [OpenCL] AMDGCN target will generate images in constant address space.
ashi1 updated this object.
ashi1 added reviewers: yaxunl, Anastasia.
ashi1 set the repository for this revision to rL LLVM.
ashi1 added a subscriber: cfe-commits.
yaxunl added inline comments.Jul 19 2016, 11:32 AM
test/CodeGenOpenCL/opencl_types.cl
1 ↗(On Diff #64526)

I think we should add -triple spir-unknown-unknown for this command, otherwise by default all address spaces are mapped to 0.

ashi1 updated this revision to Diff 64538.Jul 19 2016, 11:59 AM
ashi1 marked an inline comment as done.

Revised based on Sam's comments. Also updated test file to changes with using triple spir-unknown-unknown.

yaxunl accepted this revision.Jul 19 2016, 12:20 PM
yaxunl edited edge metadata.

LGTM. Thanks!

This revision is now accepted and ready to land.Jul 19 2016, 12:20 PM
Anastasia accepted this revision.Jul 20 2016, 7:52 AM
Anastasia edited edge metadata.

LGTM!

lib/CodeGen/TargetInfo.cpp
6868 ↗(On Diff #64538)

can you remove one ;

ashi1 updated this revision to Diff 64706.Jul 20 2016, 10:10 AM
ashi1 edited edge metadata.
ashi1 marked an inline comment as done.

Removed excess semicolon by Anastasia's comments

This revision was automatically updated to reflect the committed changes.