[cuda] Driver changes to compile and stitch together host and device-side CUDA code.
authorArtem Belevich <tra@google.com>
Mon, 13 Jul 2015 20:21:06 +0000 (20:21 +0000)
committerArtem Belevich <tra@google.com>
Mon, 13 Jul 2015 20:21:06 +0000 (20:21 +0000)
commitcd42e7f77a788969bc9365b8b0b2f21e2308e04e
tree454855373f13ce3944547ca616219084bb0f4bbe
parent6145ad2d3654350110e25460d0fcd9656a46e36c
[cuda] Driver changes to compile and stitch together host and device-side CUDA code.

  - Changed driver pipeline to compile host and device side of CUDA
    files and incorporate results of device-side compilation into host
    object file.

  - Added a test for cuda pipeline creation in clang driver.

  New clang options:
  --cuda-host-only   - Do host-side compilation only.
  --cuda-device-only - Do device-side compilation only.

  --cuda-gpu-arch=<ARCH> - specify GPU architecture for device-side
    compilation. E.g. sm_35, sm_30. Default is sm_20. May be used more
    than once in which case one device-compilation will be done per
    unique specified GPU architecture.

  Differential Revision: http://reviews.llvm.org/D9509

llvm-svn: 242058
17 files changed:
clang/include/clang/Driver/Action.h
clang/include/clang/Driver/Options.td
clang/include/clang/Driver/Types.def
clang/include/clang/Driver/Types.h
clang/lib/Driver/Action.cpp
clang/lib/Driver/Driver.cpp
clang/lib/Driver/ToolChain.cpp
clang/lib/Driver/ToolChains.cpp
clang/lib/Driver/ToolChains.h
clang/lib/Driver/Tools.cpp
clang/lib/Driver/Types.cpp
clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
clang/test/Driver/cuda-options.cu [new file with mode: 0644]
clang/test/Index/attributes-cuda.cu
clang/test/Index/index-file.cu [new file with mode: 0644]
clang/tools/libclang/CIndex.cpp
clang/unittests/ASTMatchers/ASTMatchersTest.h