)]}'
{
  "commit": "396a31fca9bbeaafc41a60d4e2a9a6cf7ca03398",
  "tree": "0d50fde8f3d4f2304ae331962898caffeb512962",
  "parents": [
    "7ed2f70f6c5b3849017f0eb38c521cc5d42040a2"
  ],
  "author": {
    "name": "Yaxun (Sam) Liu",
    "email": "yaxun.liu@amd.com",
    "time": "Mon Jun 08 22:05:29 2026 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Jun 08 22:05:29 2026 -0400"
  },
  "message": "Reland HIP offload PGO compiler support and link the device-profile runtime (#201607)\n\nThis mostly relands the compiler part of #177665 (approved and merged,\nthen reverted in #201416). The first commit restores it as merged: the\nAMDGPU instrumentation in LLVM and the HIP codegen in Clang.\n\n#177665 was reverted because of a Windows CRT problem, fixed by\nsplitting the ROCm runtime into a separate library clang_rt.profile_rocm\n(see the compiler-rt PR). The second commit links that library on the\nhost for HIP device PGO, in addOffloadRTLibs for the Linux and MSVC\ntoolchains, gated on HIP + profiling + the library being present. It is\na superset of clang_rt.profile and is linked first, so the base library\nstays inert. Non-HIP links are unaffected.\n\nDepends on the compiler-rt PR that adds clang_rt.profile_rocm.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "259b6c040706b5cea30be1427e1a8943eb8e1195",
      "old_mode": 33188,
      "old_path": "clang/lib/CodeGen/CGCUDANV.cpp",
      "new_id": "65f398af7902b29013d14c31de1096a924b435a4",
      "new_mode": 33188,
      "new_path": "clang/lib/CodeGen/CGCUDANV.cpp"
    },
    {
      "type": "modify",
      "old_id": "5f04afe34c554b8a01467d58834883775abe65b7",
      "old_mode": 33188,
      "old_path": "clang/lib/Driver/ToolChains/Linux.cpp",
      "new_id": "d3c94c8addffa97345c4e6b176c11655f4b610de",
      "new_mode": 33188,
      "new_path": "clang/lib/Driver/ToolChains/Linux.cpp"
    },
    {
      "type": "modify",
      "old_id": "6bc58699fb0075af81f228fdca7e388bc361b60a",
      "old_mode": 33188,
      "old_path": "clang/lib/Driver/ToolChains/MSVC.cpp",
      "new_id": "8141f9f132421cda0e48a3c041c3f86ee84e58c6",
      "new_mode": 33188,
      "new_path": "clang/lib/Driver/ToolChains/MSVC.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "17c6fe7b9e609067e7e19b7936c330b6419c0b99",
      "new_mode": 33188,
      "new_path": "clang/test/CodeGenHIP/offload-pgo-sections.hip"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5e99d3f4f2feea1da8c56e24a5a320108cf8e7ec",
      "new_mode": 33188,
      "new_path": "clang/test/Driver/hip-profile-rocm-runtime.hip"
    },
    {
      "type": "modify",
      "old_id": "cbdc48a9a717fba1730bad79a27246e7134241fa",
      "old_mode": 33188,
      "old_path": "llvm/include/llvm/IR/RuntimeLibcalls.td",
      "new_id": "37bad559f49e7c014e55f1f599ccd77ec99626d4",
      "new_mode": 33188,
      "new_path": "llvm/include/llvm/IR/RuntimeLibcalls.td"
    },
    {
      "type": "modify",
      "old_id": "33e55960509a7ec58700116ea13f85c63c01178c",
      "old_mode": 33188,
      "old_path": "llvm/include/llvm/ProfileData/InstrProf.h",
      "new_id": "90471e910bb50dc75f6fb6af56cafd2847976fd1",
      "new_mode": 33188,
      "new_path": "llvm/include/llvm/ProfileData/InstrProf.h"
    },
    {
      "type": "modify",
      "old_id": "dabd495cddd498e41b3af15b581ef389bdd3339d",
      "old_mode": 33188,
      "old_path": "llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp",
      "new_id": "8e4ba419197689ba93d898ebc6beba6d0c6efecf",
      "new_mode": 33188,
      "new_path": "llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp"
    },
    {
      "type": "modify",
      "old_id": "db032d6fcad45967063b43f63477bb7aa6d16eb1",
      "old_mode": 33188,
      "old_path": "llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp",
      "new_id": "b6d07aa821e7f715c0dea26d39c7a72db2980387",
      "new_mode": 33188,
      "new_path": "llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "efe53ab1ebdfb1ed9a702fea1d20631215bfc1be",
      "new_mode": 33188,
      "new_path": "llvm/test/Instrumentation/InstrProfiling/amdgpu-instrumentation.ll"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "eab78fb3591b18040c98e5823b530378fcf4a36d",
      "new_mode": 33188,
      "new_path": "llvm/test/Instrumentation/InstrProfiling/amdgpu-profc-arrays.ll"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ce16f1ee3215f8a4aa5e7e2ca1749c8cd4bf8789",
      "new_mode": 33188,
      "new_path": "llvm/test/Instrumentation/InstrProfiling/gpu-weak.ll"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "21b1d68004b136cfce1ec4ff47179579be08745e",
      "new_mode": 33188,
      "new_path": "llvm/test/Transforms/PGOProfile/amdgpu-disable-value-profiling.ll"
    }
  ]
}
