[clang] [compiler-rt] [llvm] [PGO][HIP] Fix HIP device profile collection and sections emission (PR #202095)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 9 02:25:25 PDT 2026


================
@@ -1407,6 +1421,25 @@ void CGNVCUDARuntime::emitOffloadProfilingSections() {
       M, PtrTy, /*isConstant=*/false, llvm::GlobalValue::ExternalLinkage,
       llvm::ConstantPointerNull::get(PtrTy), Name);
   CGM.addCompilerUsedGlobal(OffloadProfShadow);
+
+  auto AddSectionShadow = [&](StringRef Kind, StringRef DeviceName) {
----------------
arsenm wrote:

Make this take Twine for DeviceName and defer std::string creation until needed 

https://github.com/llvm/llvm-project/pull/202095


More information about the cfe-commits mailing list