[PATCH] D31211: [AMDGPU] Add target feature new-addr

Yaxun Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 21 16:13:56 PDT 2017


yaxunl added a comment.

In https://reviews.llvm.org/D31211#707021, @rampitec wrote:

> In https://reviews.llvm.org/D31211#706913, @yaxunl wrote:
>
> > In https://reviews.llvm.org/D31211#706894, @rampitec wrote:
> >
> > > I believe it is much more than just adding feature. At the very least it should change addrspace enum and potentially its uses.
> >
> >
> > This is just a start point for upstreaming the Clang changes. Further changes will follow.
>
>
> From this it is hard to tell what will you do with the static addrspace enum...


For now this is mainly to provide a matching data layout for Clang, otherwise when Clang emit llvm for AMDGPU there will be warnings.

We cannot upstream everything at the same time. That will be too big to review. The plan is to let Clang generates expected LLVM IR first, then bring in the backend change.

By this patch, we can also facilitate upstreaming the changes for letting alloca returning private pointer. What we need to do is for the old address space mapping we let alloca return pointer in address space 0, and for the new address space mapping, we let alloca return pointer in address space 5. This way, we could upstream the alloca change without breaking anything. In the final stage hopefully we only need minor changes to switch to the new address space mapping.


https://reviews.llvm.org/D31211





More information about the llvm-commits mailing list