[PATCH] D80237: [hip] Ensure pointer in struct argument has proper `addrspacecast`.
Michael Liao via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 19 13:44:42 PDT 2020
hliao created this revision.
hliao added reviewers: arsenm, tra, rjmccall, yaxunl.
Herald added subscribers: cfe-commits, kerbowa, nhaehnle, wdng, jvesely.
Herald added a project: clang.
- In last https://reviews.llvm.org/D69826, generic pointers in struct/array types are also replaced with global pointers. But, as no additional `addrspacecast` is inserted, they are promoted with a `ptrtoint`/`inttoptr` pair in SROA/GVN. That breaks the address space inferring as well as other optimizations. For such case, we need to recursively dive into these aggregate types and insert `addrspacecast` when necessary.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80237
Files:
clang/lib/CodeGen/CGCall.cpp
clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80237.265017.patch
Type: text/x-patch
Size: 11515 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200519/59c1af36/attachment-0001.bin>
More information about the cfe-commits
mailing list