[PATCH] D120272: [CUDA] Add driver support for compiling CUDA with the new driver

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 21 13:54:02 PST 2022


jdoerfert added a comment.

Tests?



================
Comment at: clang/lib/Driver/Driver.cpp:3956
       LA = C.MakeAction<LinkerWrapperJobAction>(LinkerInputs, types::TY_Image);
-      LA->propagateHostOffloadInfo(OffloadKinds,
+      LA->propagateHostOffloadInfo(C.getActiveOffloadKinds(),
                                    /*BoundArch=*/nullptr);
----------------
Everything till here can be a NFC commit, right? Let's split it off


================
Comment at: clang/lib/Driver/Driver.cpp:4108
+}
+
 Action *Driver::BuildOffloadingActions(Compilation &C,
----------------
Can we have a doxygen comment explaining what these helpers do?


================
Comment at: clang/lib/Driver/Driver.cpp:4122
+  const Action::OffloadKind OffloadKinds[] = {
+      Action::OFK_OpenMP, Action::OFK_Cuda, Action::OFK_HIP};
 
----------------
With the NFC commit we can probably also include some of this but restricted to OFK_OpenMP. Try  to minimize the functional change that one has to think about.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120272/new/

https://reviews.llvm.org/D120272



More information about the cfe-commits mailing list