[PATCH] D89525: [amdgpu] Enhance AMDGPU AA.

Yaxun Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 16 13:49:33 PDT 2020


yaxunl added a subscriber: tra.
yaxunl added a comment.

In D89525#2333924 <https://reviews.llvm.org/D89525#2333924>, @hliao wrote:

> @yaxunl could you double-check that OpenCL also follows that rule.
> @nhaehnle could you check whether that potentially breaks graphics.

I think they are correct for OpenCL, since in OpenCL shared var can only be declared in kernel function or passed by kernel arg.

However I am not sure whether a constant pointer can pointer to shared memory, i.e, whether the address of a shared variable is compile time constant, or whether the following is valid code:

  __shared__ int a;
  
  __constant__ int *b = &a;

Currently clang allows it but nvcc does not https://godbolt.org/z/9W8vee

I tends to agree with nvcc's treatment since this allows more flexible way of implementing shared variable supports in backend. @tra for advice


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89525/new/

https://reviews.llvm.org/D89525



More information about the llvm-commits mailing list