[PATCH] D80237: [hip] Ensure pointer in struct argument has proper `addrspacecast`.

Michael Liao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 22 20:21:50 PDT 2020


hliao marked an inline comment as done.
hliao added a comment.

In D80237#2051887 <https://reviews.llvm.org/D80237#2051887>, @rjmccall wrote:

> `addrspacecast` might be a real conversion.  I feel like this is really going well beyond what argument coercion should be expected to do, and we need to step back and re-evaluate how we're doing this.


`addrspacecast` *must* be a no-op in terms of argument coercion. As we change the parameter type but cannot control how an argument is prepared, coercion should only change how we interpret them instead of how we encode them. If the target chooses to add an `addrspacecast`, it must ensure that's a no-op. In AMDGPU, global pointers have the same encoding as their corresponding generic pointers.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80237





More information about the cfe-commits mailing list