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

2020-05-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D80237#2062991 , @arsenm wrote: > In D80237#2058108 , @rjmccall wrote: > > > In D80237#2055902 , @arsenm wrote: > > > > > In D80237#2051933

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

2020-05-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D80237#2058108 , @rjmccall wrote: > In D80237#2055902 , @arsenm wrote: > > > In D80237#2051933 , @rjmccall > > wrote: > > > > > Okay. Can you exp

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

2020-05-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D80237#2055902 , @arsenm wrote: > In D80237#2051933 , @rjmccall wrote: > > > Okay. Can you explain why we need to coerce in the first place, though? > > Especially if the representati

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

2020-05-26 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D80237#2051933 , @rjmccall wrote: > Okay. Can you explain why we need to coerce in the first place, though? > Especially if the representation is the same, why is your target-lowering > requiring parameters to be coerced to i

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

2020-05-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Okay. Can you explain why we need to coerce in the first place, though? Especially if the representation is the same, why is your target-lowering requiring parameters to be coerced to involve pointers in a different address space? Repository: rG LLVM Github Monor

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

2020-05-22 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D80237#2051918 , @rjmccall wrote: > In D80237#2051909 , @hliao wrote: > > > In D80237#2051887 , @rjmccall > > wrote: > > > > > `addrspacecast` migh

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

2020-05-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D80237#2051909 , @hliao wrote: > In D80237#2051887 , @rjmccall wrote: > > > `addrspacecast` might be a real conversion. I feel like this is really > > going well beyond what argument c

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

2020-05-22 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added a comment. In 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

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

2020-05-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. `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. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2020-05-19 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 265148. hliao added a comment. Revise following comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80237/new/ https://reviews.llvm.org/D80237 Files: clang/lib/CodeGen/CGCall.cpp clang/test/CodeGenCUDA/a

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

2020-05-19 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:1339 + } + for (uint64_t i = 0, e = SrcATy->getNumElements(); i < e; ++i) { +Address EltPtr = CGF.Builder.CreateConstArrayGEP(Dest, i); Is there a limit on array size? We may en

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

2020-05-19 Thread Michael Liao via Phabricator via cfe-commits
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 globa