[PATCH] D42922: [CUDA] Register relocatable GPU binaries
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 19 11:49:29 PDT 2018
tra added inline comments.
================
Comment at: lib/CodeGen/CGCUDANV.cpp:364-377
+ llvm::Constant *NVModuleIDConstant;
+ SmallString<64> NVModuleID;
+ if (RelocatableDeviceCode) {
+ // Generate a unique module ID.
+ llvm::raw_svector_ostream OS(NVModuleID);
+ OS << "__nv_" << llvm::format("%x", FatbinWrapper->getGUID());
+ NVModuleIDConstant =
----------------
This can all be folded into the 'else' branch of the 'if' below.
https://reviews.llvm.org/D42922
More information about the cfe-commits
mailing list