[PATCH] D115661: [clang][amdgpu] - Choose when to promote VarDecl to address space 4.

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 14 14:46:07 PST 2021


arsenm added a comment.

In D115661#3193431 <https://reviews.llvm.org/D115661#3193431>, @yaxunl wrote:

> What about situations of a derived pointer to the global variable? For example
>
>   const int a[100] ;
>   
>   foo(&a[50]);
>
> If we put a in addr space 4, it is easy to deduce &a[50] is constant. If we put a in addr space 1, how does backend know &a[50] is constant?

Everything using alias analysis looks back for the definition of the original object


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115661



More information about the cfe-commits mailing list