r357532 - [HIP-Clang] Fat binary should not be produced for non GPU code
Aaron Enye Shi via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 2 14:54:41 PDT 2019
Author: aaronenyeshi
Date: Tue Apr 2 14:54:41 2019
New Revision: 357532
URL: http://llvm.org/viewvc/llvm-project?rev=357532&view=rev
Log:
[HIP-Clang] Fat binary should not be produced for non GPU code
clang-format the changes to CUDA and HIP fat binary.
Reviewers: yaxunl, tra
Differential Revision: https://reviews.llvm.org/D60141
Modified:
cfe/trunk/lib/CodeGen/CGCUDANV.cpp
Modified: cfe/trunk/lib/CodeGen/CGCUDANV.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCUDANV.cpp?rev=357532&r1=357531&r2=357532&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCUDANV.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCUDANV.cpp Tue Apr 2 14:54:41 2019
@@ -473,8 +473,8 @@ llvm::Function *CGNVCUDARuntime::makeMod
StringRef CudaGpuBinaryFileName = CGM.getCodeGenOpts().CudaGpuBinaryFileName;
if (CudaGpuBinaryFileName.empty() && !IsHIP)
return nullptr;
- if ( (IsHIP || (IsCUDA && !RelocatableDeviceCode) )
- && EmittedKernels.empty() && DeviceVars.empty())
+ if ((IsHIP || (IsCUDA && !RelocatableDeviceCode)) && EmittedKernels.empty() &&
+ DeviceVars.empty())
return nullptr;
// void __{cuda|hip}_register_globals(void* handle);
More information about the cfe-commits
mailing list