This patch provides a generic way of selecting CUDA based tool chains as host-device pairs.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
2181–2190 ↗ | (On Diff #87454) | This is unrelated to CUDA, please split that into its own patch. |
Is there a way to actually test the changed code? The current test changes seem unrelated...
include/clang/Basic/DiagnosticDriverKinds.td | ||
---|---|---|
165–166 ↗ | (On Diff #93679) | This diagnostic seems unrelated to the code. |
test/OpenMP/target_messages.cpp | ||
7–8 ↗ | (On Diff #93679) | This test seems unrelated to the changes to the code. |
LGTM with one small note
lib/Driver/Driver.cpp | ||
---|---|---|
564 | The code above uses HostTriple.str(), maybe better align to this? |
Tests?
lib/Driver/Driver.cpp | ||
---|---|---|
556 | Seems to me you're not using this initial value, so it is better to leave this variable uninitialized |
lib/Driver/Driver.cpp | ||
---|---|---|
564 | HostTriple is equivalent with HostTC->getTriple(). HostTC->getTriple() is only used once so no need for a local variable unless you want me to refactor the CUDA code above and take out HostTriple from within the if statement and then re0use HostTriple that way. I'd rather not make changes to the CUDA toolchain above. |
Can't write any meaningful tests. This will be tested implicitely by all future patches that perform offloading using OpenMP.
lib/Driver/Driver.cpp | ||
---|---|---|
564 | Sorry, I meant the mismatch between .str() above and .normalize() here |
Seems to me you're not using this initial value, so it is better to leave this variable uninitialized