[PATCH] D45061: [NVPTX, CUDA] Use custom feature detection to handle NVPTX target builtins.

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 29 13:49:23 PDT 2018


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.

This is needed to control availability of target builtins in NVPTX that are
available for large enough set of combinations that would make it very
cumbersome to enumerate individually.


https://reviews.llvm.org/D45061

Files:
  clang/include/clang/Basic/BuiltinsNVPTX.def
  clang/include/clang/Basic/Cuda.h
  clang/lib/Basic/Targets/NVPTX.cpp
  clang/lib/Basic/Targets/NVPTX.h
  clang/test/CodeGen/builtins-nvptx-ptx50.cu
  clang/test/CodeGen/builtins-nvptx.c
  llvm/lib/Target/NVPTX/NVPTX.td
  llvm/lib/Target/NVPTX/NVPTXSubtarget.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45061.140321.patch
Type: text/x-patch
Size: 42166 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180329/ab3f103d/attachment-0001.bin>


More information about the cfe-commits mailing list