)]}'
{
  "commit": "d50e9f17fffa9b047dcf02eb9e1fe499178a0f02",
  "tree": "a753b020d5c2545b28e7ed831e7bb70044a0626d",
  "parents": [
    "22ada6bbe4e66747dcf6ee121c20730685cf5b03"
  ],
  "author": {
    "name": "Paul-Antoine Arras",
    "email": "parras@baylibre.com",
    "time": "Fri Jun 19 16:53:21 2026 +0200"
  },
  "committer": {
    "name": "Paul-Antoine Arras",
    "email": "parras@baylibre.com",
    "time": "Wed Jun 24 15:24:42 2026 +0200"
  },
  "message": "openmp: Add GOMP_reduction_start and GOMP_reduction_end\n\nWhen lowering reduction clauses, the compiler brackets the critical section\naround the accumulation step with calls to GOMP_atomic_start and\nGOMP_atomic_end. These are the same entry points used for `#pragma omp atomic\u0027\nconstructs, so OMPT cannot distinguish reductions from user atomics.\n\nIntroduce dedicated GOMP_reduction_start and GOMP_reduction_end entry\npoints in libgomp. Update omp-low to emit calls to the new builtins\ninstead.\n\nAlso register the new builtins as memory barriers to avoid illegal optimisations\nin later passes.\n\ngcc/ChangeLog:\n\n\t* omp-builtins.def (BUILT_IN_GOMP_REDUCTION_START): New builtin.\n\t(BUILT_IN_GOMP_REDUCTION_END): New builtin.\n\t* omp-low.cc (lower_reduction_clauses): Replace\n\tBUILT_IN_GOMP_ATOMIC_START / BUILT_IN_GOMP_ATOMIC_END with\n\tBUILT_IN_GOMP_REDUCTION_START / BUILT_IN_GOMP_REDUCTION_END.\n\t(lower_omp_sections): Likewise.\n\t(lower_omp_scope): Likewise.\n\t(lower_omp_for): Likewise.\n\t* tree-ssa-alias.cc (check_fnspec): Handle\n\tBUILT_IN_GOMP_REDUCTION_START and BUILT_IN_GOMP_REDUCTION_END as\n\tmemory barriers.\n\nlibgomp/ChangeLog:\n\n\t* atomic.c (GOMP_reduction_start): New function.\n\t(GOMP_reduction_end): New function.\n\t* libgomp.map (GOMP_6.0.2): Export GOMP_reduction_start and\n\tGOMP_reduction_end.\n\t* libgomp_g.h (GOMP_reduction_start): New declaration.\n\t(GOMP_reduction_end): New declaration.\n\ngcc/testsuite/ChangeLog:\n\n\t* c-c++-common/gomp/atomic-builtins-1.c: New test.\n\t* c-c++-common/gomp/reduction-builtins-1.c: New test.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0a9dde8f6187d2b5dff8bb1177998f3ab72a0280",
      "old_mode": 33188,
      "old_path": "gcc/omp-builtins.def",
      "new_id": "d7440a42761bd923a3d6c2f4bd2acff2cca6b2f8",
      "new_mode": 33188,
      "new_path": "gcc/omp-builtins.def"
    },
    {
      "type": "modify",
      "old_id": "30a4d02f2e20f4a60213c06e9f81a46604f0bce3",
      "old_mode": 33188,
      "old_path": "gcc/omp-low.cc",
      "new_id": "dbdbc4079f4d6a29b424de49d40c67e2b0cac095",
      "new_mode": 33188,
      "new_path": "gcc/omp-low.cc"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "75b34319ddb6373f2acfe30ec3028fb780b04df4",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/c-c++-common/gomp/atomic-builtins-1.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "bef786be374acb44edc3026287d53ee9b5335840",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/c-c++-common/gomp/reduction-builtins-1.c"
    },
    {
      "type": "modify",
      "old_id": "9f3dd2adac0bc467db4d74926be55c34ce576741",
      "old_mode": 33188,
      "old_path": "gcc/tree-ssa-alias.cc",
      "new_id": "467ef1c215f1cb18bed0380210351f9b45c724e0",
      "new_mode": 33188,
      "new_path": "gcc/tree-ssa-alias.cc"
    },
    {
      "type": "modify",
      "old_id": "df5b810eaef8350e8aaa757b03251cb3408da9f6",
      "old_mode": 33188,
      "old_path": "libgomp/atomic.c",
      "new_id": "0167cdfa40ae33434ceeeaea5ff32a69fc3d26bf",
      "new_mode": 33188,
      "new_path": "libgomp/atomic.c"
    },
    {
      "type": "modify",
      "old_id": "92ef5c298f4d9d6ee5e8dfc4b5c7d4ae74dc6fc4",
      "old_mode": 33188,
      "old_path": "libgomp/libgomp.map",
      "new_id": "e2985347bf778651cf1deedbcdb824c87614a525",
      "new_mode": 33188,
      "new_path": "libgomp/libgomp.map"
    },
    {
      "type": "modify",
      "old_id": "89ed7b3462e33afe8f77ccbe5eefc7c55decea1e",
      "old_mode": 33188,
      "old_path": "libgomp/libgomp_g.h",
      "new_id": "892ad3a5581020cf4c2a37bf65edcd35af4b5152",
      "new_mode": 33188,
      "new_path": "libgomp/libgomp_g.h"
    }
  ]
}
