[PATCH] D21904: [OpenMP] Initial implementation of parse+sema for clause use_device_ptr of 'target data'

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 30 22:01:42 PDT 2016

ABataev added a comment.

In http://reviews.llvm.org/D21904#472074, @carlo.bertolli wrote:

> I think that Kelvin is right. This is what that sentence refers to:
>  int * bla = ..;
>  #pragma omp target data use_device_ptr(bla)
>  {
>   .. bla .. // <-- this is the 'reference' that sentence is about
> }
> What puzzles me about that sentence is that it seems it is asking us to use bla as following:
>  int addr_bla = &bla;
>  // now can use addr_bla
> I am specifically referring to this part of the sentence: "must be to the address of the list item"
> Anyway, as Kelvin says, this has nothing to do with what we expect sema for use_device_ptr to accept. Samuel point, but I may be mistaken, is that a reference to a pointer should be considered as a pointer itself.
>  Alexey: if you do not think this is right, I can add a test that excludes references.
> Finally, thanks for the very quick review and for all your comments
> - Carlo

Carlo, I'm not sure about this sentence at all. If you think that this construct may accept references to pointers, then go ahead and ignore my previous comment.



More information about the cfe-commits mailing list