[Lldb-commits] [compiler-rt] [libcxx] [flang] [openmp] [llvm] [clang-tools-extra] [clang] [lldb] [lld] [libc] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)
Matt Arsenault via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 5 05:28:40 PST 2024
================
@@ -862,14 +862,18 @@ static void instrumentOneFunc(
auto Name = FuncInfo.FuncNameVar;
auto CFGHash = ConstantInt::get(Type::getInt64Ty(M->getContext()),
FuncInfo.FunctionHash);
+ // Make sure that pointer to global is passed in with zero addrspace
+ // This is relevant during GPU profiling
+ auto *NormalizedPtr = llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(
+ Name, llvm::PointerType::getUnqual(M->getContext()));
----------------
arsenm wrote:
Avoid getUnqual, use an explicit 0 addrspace.
Also there should be no reason to emit pointer bitcast, simplify to just create addrspacecast
https://github.com/llvm/llvm-project/pull/76587
More information about the lldb-commits
mailing list