tra updated this revision to Diff 141932.
tra added a comment.
@echristo convinced me that this functionality can be implemented without
growing a target-specific hook for custom interpretation of constraints used in
TARGET_BUILTIN. Instead, we can hide unwieldy feature lists behind a macro.
tra added a comment.
In https://reviews.llvm.org/D45061#1053795, @echristo wrote:
> Let's talk about the rest of it more. I'm not sure I'm seeing the need here
> rather than the annotations that are already here. Can you elaborate more
> here on why we need an additional method when you've
echristo added a comment.
The llvm change and corresponding switch from satom->sm_60 in the front end is
fine.
Let's talk about the rest of it more. I'm not sure I'm seeing the need here
rather than the annotations that are already here. Can you elaborate more here
on why we need an
tra updated this revision to Diff 140493.
tra added a comment.
Commented out unused argument.
https://reviews.llvm.org/D45061
Files:
clang/include/clang/Basic/BuiltinsNVPTX.def
clang/lib/Basic/Targets/NVPTX.cpp
clang/lib/Basic/Targets/NVPTX.h
clang/test/CodeGen/builtins-nvptx-ptx50.cu
tra updated this revision to Diff 140447.
tra added a comment.
Removed unneeded function.
https://reviews.llvm.org/D45061
Files:
clang/include/clang/Basic/BuiltinsNVPTX.def
clang/lib/Basic/Targets/NVPTX.cpp
clang/lib/Basic/Targets/NVPTX.h
clang/test/CodeGen/builtins-nvptx-ptx50.cu
tra added inline comments.
Comment at: clang/include/clang/Basic/Cuda.h:55
+static inline const std::vector CudaKnownArchList() {
+ return {CudaArch::SM_20, CudaArch::SM_21, CudaArch::SM_30, CudaArch::SM_32,
jlebar wrote:
> Why 'static'?
Old habits. Just
jlebar accepted this revision.
jlebar added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/include/clang/Basic/Cuda.h:55
+static inline const std::vector CudaKnownArchList() {
+ return {CudaArch::SM_20, CudaArch::SM_21, CudaArch::SM_30,
tra updated this revision to Diff 140334.
tra added a comment.
Run the tests with -target-cpu sm_61 to make sure intrinsics that require sm_60
are still enabled.
https://reviews.llvm.org/D45061
Files:
clang/include/clang/Basic/BuiltinsNVPTX.def
clang/include/clang/Basic/Cuda.h
tra created this revision.
tra added a reviewer: jlebar.
Herald added subscribers: hiraditya, sanjoy, jholewinski.
When NVPTX TARGET_BUILTIN specifies sm_XX or ptxYY as required feature,
consider those features available if we're compiling for GPU >= sm_XX or have
enabled PTX version >= ptxYY.