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 | This is unrelated to CUDA, please split that into its own patch. |
LGTM with one small note
lib/Driver/Driver.cpp | ||
---|---|---|
534 | The code above uses HostTriple.str(), maybe better align to this? |
Tests?
lib/Driver/Driver.cpp | ||
---|---|---|
526–541 | Seems to me you're not using this initial value, so it is better to leave this variable uninitialized |
lib/Driver/Driver.cpp | ||
---|---|---|
534 | 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 | ||
---|---|---|
534 | Sorry, I meant the mismatch between .str() above and .normalize() here |
This diagnostic seems unrelated to the code.