[PATCH] D47201: [CUDA] Implement nv_weak attribute for functions

2018-06-05 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld abandoned this revision. Hahnfeld added a comment. See https://reviews.llvm.org/D47804 Repository: rC Clang https://reviews.llvm.org/D47201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D47201: [CUDA] Implement nv_weak attribute for functions

2018-06-05 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I've experimented a bit and I think that we may not need this patch at all. As far as I can tell, nv_weak is only applicable to __device__ functions. It's ignored for __global__ kernels and is apparently forbidden for data. For __device__ functions nvcc produces .weak attribu

[PATCH] D47201: [CUDA] Implement nv_weak attribute for functions

2018-06-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D47201#1119947, @Hahnfeld wrote: > In https://reviews.llvm.org/D47201#1119254, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D47201#1119249, @tra wrote: > > > > > IIUIC, nv_weak is a synonym for weak (why, oh why did they need

[PATCH] D47201: [CUDA] Implement nv_weak attribute for functions

2018-06-02 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D47201#1119254, @aaron.ballman wrote: > In https://reviews.llvm.org/D47201#1119249, @tra wrote: > > > IIUIC, nv_weak is a synonym for weak (why, oh why did they need > > it?) > > You may need to hunt down and change few other places that dea

[PATCH] D47201: [CUDA] Implement nv_weak attribute for functions

2018-06-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D47201#1119249, @tra wrote: > IIUIC, nv_weak is a synonym for weak (why, oh why did they need > it?) > You may need to hunt down and change few other places that deal with the > weak attribute. > E.g.: > https://github.com/llvm-proje

[PATCH] D47201: [CUDA] Implement nv_weak attribute for functions

2018-06-01 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. IIUIC, nv_weak is a synonym for weak (why, oh why did they need it?) You may need to hunt down and change few other places that deal with the weak attribute. E.g.: https://github.com/llvm-project/llvm-project-20170507/blob/master/clang/lib/AST/Decl.cpp#L4267 https://github.

[PATCH] D47201: [CUDA] Implement nv_weak attribute for functions

2018-05-31 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. Ping Repository: rC Clang https://reviews.llvm.org/D47201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47201: [CUDA] Implement nv_weak attribute for functions

2018-05-22 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld created this revision. Hahnfeld added a reviewer: tra. Herald added a subscriber: cfe-commits. This is needed for relocatable device code with CUDA 9 and later. Before this patch, linking two or more object files resulted in "Multiple definition" errors for a group of functions from cuda_