Skip to content

Commit

Permalink
Swap tests for efficiency
Browse files Browse the repository at this point in the history
Signed-off-by: Lu, John <[email protected]>
  • Loading branch information
Lu, John committed Sep 17, 2024
1 parent 32bee57 commit 474cc03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/SYCLLowerIR/ModuleSplitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,8 @@ static bool mustPreserveGV(const GlobalValue &GV) {
// cannot be imported which also means that there is no point of having it
// visible outside of the current module.
if (AllowDeviceImageDependencies)
return canBeImportedFunction(*F) ||
F->getCallingConv() == CallingConv::SPIR_KERNEL;
return F->getCallingConv() == CallingConv::SPIR_KERNEL ||
canBeImportedFunction(*F);

// Otherwise, we are being even more aggressive: SYCL modules are expected
// to be self-contained, meaning that they have no external dependencies.
Expand Down

0 comments on commit 474cc03

Please sign in to comment.