[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-07-22 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. Hi @rsmith, @rjmccall and @tra what's your suggestion to make progress on this review? In D71227#2167596 , @tra wrote: > Is this patch still actual? I need to rebase this to the latest trunk. Interrupt with other heavy loads.

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-07-22 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Is this patch still actual? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-04-29 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 261003. hliao added a comment. Rebase to trunk and resolve the conflict. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-04-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. LGTM. Can we get this in? There are other fixes depending on this. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 ___

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-04-14 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 257347. hliao added a comment. Rebase to trunk. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h clang/lib/Parse/ParseDecl.cpp

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-04-05 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 255219. hliao added a comment. Rebase to the latest trunk. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-03-18 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 251212. hliao added a comment. Fix more clang-tidy warnings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-03-18 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 251171. hliao added a comment. Fix warnings from clang-tidy. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-03-17 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 250965. hliao added a comment. Rebase to the latest trunk. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-03-02 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 247675. hliao added a comment. Remove unncessary condition checking. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-03-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/Sema/Sema.h:11444 + return nullptr; +const Decl *ContextDecl = dyn_cast(CurContext); +if (!ContextDecl) rjmccall wrote: > You really want this to match whenever we're in a local

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-02-28 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 247248. hliao added a comment. Fix pre-merge checks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-02-26 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. @rjmccall @rsmith @tra, could you review on this revision? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 ___ cfe-commits mailing list

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-02-26 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 246826. hliao added a comment. Rebase to the latest trunk. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-02-24 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 246204. hliao added a comment. Rebase to the trunk. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-02-21 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 245863. hliao added a comment. Rebase to the trunk. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-02-20 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 245747. hliao added a comment. Revise following reviewer comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-02-20 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 245735. hliao marked an inline comment as done. hliao added a comment. Rebase the code to the latest trunk. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files:

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-02-20 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/Sema/Sema.h:11444 + return nullptr; +const Decl *ContextDecl = dyn_cast(CurContext); +if (!ContextDecl) You really want this to match whenever we're in a local context, right? How

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-02-20 Thread Michael Liao via Phabricator via cfe-commits
hliao marked 2 inline comments as done. hliao added inline comments. Comment at: clang/include/clang/Sema/Sema.h:11442 + ContextDecl = getCUDACurrentNonLocalVariable(); +return ContextDecl; + } rjmccall wrote: > This is tricky because we could be in a

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-02-20 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 245682. hliao added a comment. Skip non-function or non-TU context so far as more cases need considering. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files:

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-02-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/Sema/Sema.h:11442 + ContextDecl = getCUDACurrentNonLocalVariable(); +return ContextDecl; + } This is tricky because we could be in a nested context, not just the initializer, and that

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-02-19 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 245461. hliao added a comment. Rebase to the latest trunk code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-02-17 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. + @rjmccall Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-02-04 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. @rsmith do have u the chance to review the revised change again as well as my answers to your comments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-01-30 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D71227#1831445 , @hliao wrote: > Sorry for the late reply. Really appreciate your feedback. Thanks! @rsmith Have you chance to review the revised change? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-01-21 Thread Michael Liao via Phabricator via cfe-commits
hliao marked 2 inline comments as done. hliao added a comment. Sorry for the late reply. Really appreciate your feedback. Thanks! Comment at: clang/include/clang/Sema/Sema.h:11198-11206 + SmallVector CUDANonLocalVariableStack; + + void pushCUDANonLocalVariable(const Decl

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-01-21 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 239328. hliao marked 2 inline comments as done. hliao added a comment. - revise comment. - add tests requiring tempate instantiation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-01-06 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/Sema/Sema.h:11190 /// combination, based on their host/device attributes. - /// \param Caller function which needs address of \p Callee. - /// nullptr in case of global context. - /// \param Callee

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-01-02 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 235921. hliao added a comment. code refinement after reviewers' comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-01-02 Thread Michael Liao via Phabricator via cfe-commits
hliao marked 6 inline comments as done. hliao added a comment. refinements are made after comments from reviewers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2019-12-10 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D71227#1778136 , @tra wrote: > I wonder if this patch will help with this case: > > https://godbolt.org/z/X4KdsV > > __device__ float fn(int) { return threadIdx.x; }; > __host__ float fn(float); > > float gvar1 =

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2019-12-10 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I wonder if this patch will help with this case: https://godbolt.org/z/X4KdsV __device__ float fn(int) { return threadIdx.x; }; __host__ float fn(float); float gvar1 = []()__device__ { return fn(1);} (); // This ends up calling fn(int) on *host* We seem to

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2019-12-10 Thread Artem Belevich via Phabricator via cfe-commits
tra added a subscriber: rsmith. tra added a comment. Looks good to me overall. I've pinged rsmith@ to double-check that we're covering all possibilities for non-local variable init. Comment at: clang/include/clang/Sema/Sema.h:11037 +

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2019-12-10 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. File PR44266 to track that bug. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 ___

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2019-12-09 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 232938. hliao added a comment. refine again Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h clang/lib/Parse/ParseDecl.cpp

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2019-12-09 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, jlebar, yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. hliao updated this revision to Diff 232933. hliao added a comment. hliao edited the summary of this revision. refine commit message - As global

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2019-12-09 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 232933. hliao added a comment. refine commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h