Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-09-22 Thread Artem Belevich via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL248295: [CUDA] Allow function overloads in CUDA based on host/device attributes. (authored by tra). Changed prior to commit: http://reviews.llvm.org/D12453?vs=34368&id=35387#toc Repository: rL LLVM

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-09-09 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 34368. tra added a comment. Implemented pcc@'s suggestion to disallow mixing HD and H/D functions. Removed name mangling as it's no longer needed. Restriction on HD overloading guarantees that we'll emit only one viable function during particular side of compila

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-09-08 Thread Artem Belevich via cfe-commits
tra marked 2 inline comments as done. tra added a comment. http://reviews.llvm.org/D12453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-09-08 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 34230. tra marked 2 inline comments as done. tra added a comment. Implementes Richard Smiths' suggestions: Fixed attribute order in name mangling. Replaced std::function with template argument. http://reviews.llvm.org/D12453 Files: include/clang/Basic/LangOpt

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-09-04 Thread Richard Smith via cfe-commits
rsmith accepted this revision. Comment at: lib/AST/ItaniumMangle.cpp:504 @@ +503,3 @@ + if (FD->hasAttr() && FD->hasAttr()) +Out << "Ua6deviceUa4host"; + If we have `enable_if` on a `__host__` `__device__` function, I think we should mangle as `Ua6deviceUa9e

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-09-04 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 34059. tra marked 2 inline comments as done. tra added a comment. Added more test cases to cover constructor/destructor/new/delete. Refactored code to remove unwanted CUDA functions from Lookup match results. Disabled HD overloading of H or H destructors to guaran

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-09-01 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/Builtins.h:85 @@ +84,3 @@ + /// \brief Return true if this function is a target-specific builtin + bool isTSBuiltin(unsigned ID) const { +return ID >= Builtin::FirstTSBuiltin; I would prefer the m

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-09-01 Thread Artem Belevich via cfe-commits
tra marked 2 inline comments as done. Comment at: lib/Sema/SemaCUDA.cpp:106 @@ +105,3 @@ + + // (a) Can't call global from global until we support dynamic execution. + if (CalleeTarget == CFT_Global && eliben wrote: > Not just global from global. global from dev

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-09-01 Thread Artem Belevich via cfe-commits
tra updated the summary for this revision. tra updated this revision to Diff 33741. tra marked an inline comment as done. tra added a comment. Removed builtin-related changes(http://reviews.llvm.org/D12122). Will commit them separately. Added more test cases. Addressed eliben@'s comments. http:

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-09-01 Thread Eli Bendersky via cfe-commits
eliben accepted this revision. eliben added a comment. This revision is now accepted and ready to land. The CUDA parts look very good. Someone else should approve the overloading-related logic Comment at: include/clang/Sema/Sema.h:8605 @@ +8604,3 @@ + + CUDAFunctionPreference

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-08-31 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 33654. tra marked 2 inline comments as done. tra added a comment. addressed eliben@'s comments. http://reviews.llvm.org/D12453 Files: include/clang/Basic/Builtins.h include/clang/Basic/LangOptions.def include/clang/Driver/CC1Options.td include/clang/Sem

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-08-31 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: include/clang/Sema/Sema.h:8599 @@ +8598,3 @@ +CFP_Never, // Invalid caller/callee combination. +CFP_LastResort, // same as CFP_Never or CFP_Fallback, depending on +// -fcuda-disable-target-call-checks option -

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-08-31 Thread Eli Bendersky via cfe-commits
eliben added inline comments. Comment at: include/clang/Sema/Sema.h:8599 @@ +8598,3 @@ +CFP_Never, // Invalid caller/callee combination. +CFP_LastResort, // same as CFP_Never or CFP_Fallback, depending on +// -fcuda-disable-target-call-checks optio

[PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-08-28 Thread Artem Belevich via cfe-commits
tra created this revision. tra added reviewers: eliben, rsmith, jholewinski, echristo, jingyue. tra added a subscriber: cfe-commits. The patch makes it possible to parse CUDA files that contain host/device functions with identical signatures, but different attributes without having to physicall