This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] Fix pipe size in TypeInfo.
ClosedPublic

Authored by Anastasia on May 26 2017, 7:18 AM.

Details

Summary

Pipes are now the size of pointers rather than the size of the type that they contain.

Patch by Simon Perretta!

Diff Detail

Event Timeline

Anastasia created this revision.May 26 2017, 7:18 AM
yaxunl added inline comments.May 26 2017, 7:33 AM
lib/AST/ASTContext.cpp
1942–1943

pipe is in global address space. shouldn't it be

Width = Target->getPointerWidth(getTargetAddressSpace(LangAS::opencl_global));

the same with align.

svenvh added a subscriber: svenvh.May 30 2017, 3:54 AM
Anastasia updated this revision to Diff 101031.Jun 1 2017, 8:41 AM
Anastasia edited reviewers, added: yaxunl; removed: echuraev.
Anastasia removed a subscriber: yaxunl.

Use global AS pointer for pipe size.

@sam, I am moving you to the reviewer to finish this change. Do you think it makes sense to add RUN line with some AMD GPU in triple to the test?

yaxunl edited edge metadata.Jun 1 2017, 8:51 AM

Use global AS pointer for pipe size.

@sam, I am moving you to the reviewer to finish this change. Do you think it makes sense to add RUN line with some AMD GPU in triple to the test?

I would appreciate that if you can add one RUN line for triple amdgcn-amd-amdhsa-amdgizcl. Thanks.

Anastasia updated this revision to Diff 101236.Jun 2 2017, 10:33 AM

Added RUN line for AMD

yaxunl accepted this revision.Jun 2 2017, 10:42 AM

LGTM. Thanks!

This revision is now accepted and ready to land.Jun 2 2017, 10:42 AM
This revision was automatically updated to reflect the committed changes.