[PATCH] D45212: [WIP][HIP] Let CUDA toolchain support HIP language mode

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 3 09:28:06 PDT 2018


yaxunl created this revision.
yaxunl added reviewers: rjmccall, tra.
Herald added subscribers: tpr, nhaehnle, jholewinski.

This patch let CUDA toolchain support HIP language mode. It includes:

Add offloading archs for amdgpu for CUDA/HIP.

Add file type hip for toolchain.

Create specific compiler jobs for HIP.

Choose specific header/libraries for HIP.

Use clang-offload-bindler to create binary for device ISA.

This is work in progress. There are still a few lit test failures to clean up.

Patch by Greg Rodgers.
Revised and lit test added by Yaxun Liu.


https://reviews.llvm.org/D45212

Files:
  include/clang/Basic/Cuda.h
  include/clang/Basic/DiagnosticDriverKinds.td
  include/clang/Driver/Options.td
  include/clang/Driver/ToolChain.h
  include/clang/Driver/Types.def
  lib/Basic/Cuda.cpp
  lib/Basic/Targets.cpp
  lib/Basic/Targets.h
  lib/Basic/Targets/AMDGPU.cpp
  lib/Basic/Targets/AMDGPU.h
  lib/Basic/Targets/NVPTX.cpp
  lib/Driver/Driver.cpp
  lib/Driver/SanitizerArgs.cpp
  lib/Driver/ToolChain.cpp
  lib/Driver/ToolChains/Clang.cpp
  lib/Driver/ToolChains/Cuda.cpp
  lib/Driver/ToolChains/Cuda.h
  lib/Driver/ToolChains/Gnu.cpp
  lib/Driver/Types.cpp
  lib/Frontend/CompilerInstance.cpp
  test/Driver/cuda-phases.cu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45212.140811.patch
Type: text/x-patch
Size: 67497 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180403/ec3012e2/attachment-0001.bin>


More information about the cfe-commits mailing list