[openmp] [clang-tools-extra] [flang] [libcxx] [libc] [compiler-rt] [clang] [lldb] [lld] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 3 16:49:18 PST 2024


================
@@ -428,13 +428,22 @@ std::string getPGOFuncNameVarName(StringRef FuncName,
   return VarName;
 }
 
+bool isGPUProfTarget(const Module &M) {
+  const auto &triple = M.getTargetTriple();
+  return triple.rfind("nvptx", 0) == 0 || triple.rfind("amdgcn", 0) == 0 ||
+         triple.rfind("r600", 0) == 0;
+}
+
----------------
jdoerfert wrote:

Use the suggesting above. This is what we use elsewhere rn.

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


More information about the llvm-commits mailing list