[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-12-07 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288962: [CUDA] Improve target attribute checking for function templates. (authored by tra). Changed prior to commit: https://reviews.llvm.org/D25809?vs=80522=80635#toc Repository: rL LLVM

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-12-07 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. > I've reverted to 75652 Did you forget to arc diff? Anyway if it's just that if statement, lgtm. https://reviews.llvm.org/D25809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-12-07 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In https://reviews.llvm.org/D25809#615485, @jlebar wrote: > If you would like me to have another look at this, is it possible to make an > interdiff of your changes between this and the last version I reviewed? > phab's interdiff is useless because it straddles a rebase.

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-12-06 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. If you would like me to have another look at this, is it possible to make an interdiff of your changes between this and the last version I reviewed? phab's interdiff is useless because it straddles a rebase. https://reviews.llvm.org/D25809

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-12-06 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. (Alternatively I'm happy not to have another look if you don't think you need it.) https://reviews.llvm.org/D25809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-12-06 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 80522. tra added a comment. Removed HD overloading checks for using declarations. 'using' exposes number of issues with the way we handle overloading of HD functions vs H/D. The issues will be addressed in a separate patch. https://reviews.llvm.org/D25809

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-25 Thread Justin Lebar via cfe-commits
jlebar added a comment. Is it possible to write a testcase for the using-declaration change? https://reviews.llvm.org/D25809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-25 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 75816. tra added a comment. - handle using declarations found in the overload set we check. https://reviews.llvm.org/D25809 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cpp lib/Sema/SemaDecl.cpp

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-24 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:791 + CUDAFunctionTarget NewTarget = IdentifyCUDATarget(NewFD); + for (auto OldND : Previous) { +FunctionDecl *OldFD = OldND->getAsFunction(); jlebar wrote: > tra wrote: > > jlebar wrote: > > >

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-24 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 75652. tra marked an inline comment as done. tra added a comment. Addressed remaining nits. https://reviews.llvm.org/D25809 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cpp lib/Sema/SemaDecl.cpp

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added inline comments. This revision is now accepted and ready to land. Comment at: lib/Sema/SemaCUDA.cpp:87 + + if ((HasHostAttr && HasDeviceAttr) || ForceCUDAHostDeviceDepth > 0) +return CFT_HostDevice; tra wrote: >

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-21 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 75516. tra added a comment. removed pragma check from IdentifyCUDATarget for real. https://reviews.llvm.org/D25809 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cpp lib/Sema/SemaDecl.cpp

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-21 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:87 + + if ((HasHostAttr && HasDeviceAttr) || ForceCUDAHostDeviceDepth > 0) +return CFT_HostDevice; jlebar wrote: > Checking ForceCUDAHostDeviceDepth here is...yeah. Especially because the >

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-21 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 75515. tra marked 5 inline comments as done. tra added a comment. addressed jlebar's comments. https://reviews.llvm.org/D25809 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cpp lib/Sema/SemaDecl.cpp

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: test/SemaCUDA/function-template-overload.cu:44 +// explicitly specialize or instantiate function tempaltes. +template <> __host__ HType overload_hd(int a); +// expected-error@-1 {{no function template matches function template

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:87 + + if ((HasHostAttr && HasDeviceAttr) || ForceCUDAHostDeviceDepth > 0) +return CFT_HostDevice; Checking ForceCUDAHostDeviceDepth here is...yeah. Especially because the other overload of

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-19 Thread Artem Belevich via cfe-commits
tra created this revision. tra added reviewers: jlebar, rsmith. tra added a subscriber: cfe-commits. Current behavior: - __host__ __device__ (HD) functions are considered to be redeclarations of `__host__` (H) of `__device__` (D) functions with same signature. - Target attributes are not taken