[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-09-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D36410#863579, @Anastasia wrote: > In https://reviews.llvm.org/D36410#863508, @yaxunl wrote: > > > In https://reviews.llvm.org/D36410#863426, @Anastasia wrote: > > > > > In https://reviews.llvm.org/D36410#863409, @yaxunl wrote: > > > > > > > LGT

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-09-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D36410#863508, @yaxunl wrote: > In https://reviews.llvm.org/D36410#863426, @Anastasia wrote: > > > In https://reviews.llvm.org/D36410#863409, @yaxunl wrote: > > > > > LGTM as a temporary measure until we have a solution for properly > > > em

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-09-07 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312728: [OpenCL] Handle taking an address of block captures. (authored by stulova). Changed prior to commit: https://reviews.llvm.org/D36410?vs=110015&id=114197#toc Repository: rL LLVM https://revie

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-09-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D36410#863426, @Anastasia wrote: > In https://reviews.llvm.org/D36410#863409, @yaxunl wrote: > > > LGTM as a temporary measure until we have a solution for properly emitting > > blocks as enqueued kernel. > > > Should I start discussion with Kh

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-09-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D36410#863409, @yaxunl wrote: > LGTM as a temporary measure until we have a solution for properly emitting > blocks as enqueued kernel. Should I start discussion with Khronos on that? What would our preference be - implicitly `generic` AS

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-09-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM as a temporary measure until we have a solution for properly emitting blocks as enqueued kernel. https://reviews.llvm.org/D36410 ___ cfe-co

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-09-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D36410#856907, @bader wrote: > In https://reviews.llvm.org/D36410#856716, @yaxunl wrote: > > > The captured variable is still passed by value. The address taking is on > > the duplicate of the captured variable, not on the original variable.

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-09-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D36410#856907, @bader wrote: > In https://reviews.llvm.org/D36410#856716, @yaxunl wrote: > > > The captured variable is still passed by value. The address taking is on > > the duplicate of the captured variable, not on the original variable. >

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-08-30 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In https://reviews.llvm.org/D36410#856716, @yaxunl wrote: > The captured variable is still passed by value. The address taking is on the > duplicate of the captured variable, not on the original variable. In this case address of captured variables should point to the pri

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-08-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D36410#855358, @bader wrote: > In https://reviews.llvm.org/D36410#855282, @Anastasia wrote: > > > Ok, I will update it to be implicitly generic then. Just to be sure, @bader > > do you agree on this too? > > > > > > An alternative approached co

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-08-29 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In https://reviews.llvm.org/D36410#855282, @Anastasia wrote: > Ok, I will update it to be implicitly generic then. Just to be sure, @bader > do you agree on this too? > An alternative approached could be (in case we want to allow this code) to > **assume captures are

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-08-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Ok, I will update it to be implicitly generic then. Just to be sure, @bader do you agree on this too? https://reviews.llvm.org/D36410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-08-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Sorry for the delay. I feel forbidding user taking address of captured variable is too restrictive and make blocks less useful. A block is quite like a normal function with a generic pointer argument. Users take the responsibility to make sure the cast of a generic poin

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-08-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Ping! :) https://reviews.llvm.org/D36410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-08-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. There is an issue with taking an address of captured variables, because captures can be put in different locations depending on the vendor implementation (and therefore they are passed as generic AS pointer to the block). The physical location for the captures