================
@@ -1311,13 +1342,23 @@ void CGNVCUDARuntime::createOffloadingEntries() {
llvm::FunctionCallee RegisterShadow = CGM.CreateRuntimeFunction(
llvm::FunctionType::get(VoidTy, {PtrTy}, false),
"__llvm_profile_offload_register_shadow_variable");
+ llvm::FunctionCallee RegisterSectionShadow = CGM.CreateRuntimeFunction(
+ llvm::FunctionType::get(VoidTy, {PtrTy}, false),
+ "__llvm_profile_offload_register_section_shadow_variable");
auto *CtorFn = llvm::Function::Create(
llvm::FunctionType::get(VoidTy, false),
llvm::GlobalValue::InternalLinkage,
"__llvm_profile_register_shadow." + CGM.getContext().getCUIDHash(),
&M);
auto *Entry = llvm::BasicBlock::Create(Ctx, "entry", CtorFn);
llvm::IRBuilder<> B(Entry);
B.CreateCall(RegisterShadow, {OffloadProfShadow});
+ for (const auto &Info : OffloadProfSectionShadows) {
+ llvm::offloading::emitOffloadingEntry(
+ M, Kind, Info.Shadow, Info.DeviceName,
+ CGM.getDataLayout().getPointerSize(),
----------------
arsenm wrote:
Don't use default argument for getPointerSize
https://github.com/llvm/llvm-project/pull/202095
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits