Device offloading requires the specification of an additional flag containing the triple of the other architecture the code is being compiled on if such an architecture exists. If compiling for the host, the auxiliary triple flag will contain the triple describing the device and vice versa.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Frontend/CompilerInstance.cpp | ||
---|---|---|
920–921 | It's better to check !getFrontendOpts().AuxTriple.empty() only once in this condition |
Comment Actions
LGTM
lib/Driver/ToolChains/Clang.cpp | ||
---|---|---|
1967–1968 | I might be wrong here... Can you run the code through clang-format before committing to be sure? | |
lib/Frontend/CompilerInstance.cpp | ||
920–921 | Another micro optimization: (getLangOpts().CUDA || getLangOpts().OpenMPIsDevice) is probably cheaper than !getFrontendOpts().AuxTriple.empty() so it might be worth swapping the conditions as in the original code. |
I might be wrong here... Can you run the code through clang-format before committing to be sure?