[PATCH] D42800: Let CUDA toolchain support amdgpu target

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 1 09:55:13 PST 2018


arsenm added inline comments.


================
Comment at: lib/Basic/Targets/AMDGPU.cpp:437
+      case CudaArch::UNKNOWN:
+        assert(false && "No GPU arch when compiling CUDA device code.");
+        return "";
----------------
llvm_unreachable


================
Comment at: lib/Driver/ToolChains/Cuda.cpp:359-361
+  addBCLib(C, Args, CmdArgs, LibraryPaths, "opencl.amdgcn.bc");
+  addBCLib(C, Args, CmdArgs, LibraryPaths, "ockl.amdgcn.bc");
+  addBCLib(C, Args, CmdArgs, LibraryPaths, "irif.amdgcn.bc");
----------------
Why is this done under an NVPTX:: class


================
Comment at: lib/Driver/ToolChains/Cuda.cpp:390
+  else {
+    OptArgs.push_back(Args.MakeArgString("-O2"));
+    OptArgs.push_back("-S");
----------------
Why is this hardcoded?


https://reviews.llvm.org/D42800





More information about the cfe-commits mailing list