[PATCH] D69826: [hip] Enable pointer argument lowering through coercing type.
Michael Liao via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 4 14:38:36 PST 2019
hliao marked 2 inline comments as done.
hliao added inline comments.
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:7719
+ // Arrary types.
+ if (auto ATy = dyn_cast<llvm::ArrayType>(Ty)) {
+ auto T = ATy->getElementType();
----------------
arsenm wrote:
> No tests with arrays or structs?
>
> It's also not immediately obvious to me that this optimization is still valid if the pointer is buried in a struct
the original generic kernel pointer promotion to a global one only handles the pointer directly passed. From a critical workload, I found quite a few cases where the global pointers are passed through a by-val struct. We didn't handle that yet. With this case, we could start to handle that.
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:7719
+ // Arrary types.
+ if (auto ATy = dyn_cast<llvm::ArrayType>(Ty)) {
+ auto T = ATy->getElementType();
----------------
hliao wrote:
> arsenm wrote:
> > No tests with arrays or structs?
> >
> > It's also not immediately obvious to me that this optimization is still valid if the pointer is buried in a struct
> the original generic kernel pointer promotion to a global one only handles the pointer directly passed. From a critical workload, I found quite a few cases where the global pointers are passed through a by-val struct. We didn't handle that yet. With this case, we could start to handle that.
struct tests are added. From test cases, it seems to me that arry is not passed by value. I need to double-confirm.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69826/new/
https://reviews.llvm.org/D69826
More information about the cfe-commits
mailing list