[flang-commits] [llvm] [flang] [libc] [lld] [openmp] [lldb] [clang-tools-extra] [compiler-rt] [libcxx] [clang] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)
Johannes Doerfert via flang-commits
flang-commits at lists.llvm.org
Tue Jan 9 10:52:07 PST 2024
================
@@ -959,8 +959,12 @@ void CodeGenPGO::emitCounterIncrement(CGBuilderTy &Builder, const Stmt *S,
unsigned Counter = (*RegionCounterMap)[S];
- llvm::Value *Args[] = {FuncNameVar,
- Builder.getInt64(FunctionHash),
+ // Make sure that pointer to global is passed in with zero addrspace
+ // This is relevant during GPU profiling
+ auto *NormalizedPtr = llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(
+ FuncNameVar, llvm::PointerType::getUnqual(CGM.getLLVMContext()));
----------------
jdoerfert wrote:
@arsenm I think this use is a generic void*, I expect we need/want AS 0 here, always.
https://github.com/llvm/llvm-project/pull/76587
More information about the flang-commits
mailing list