)]}'
{
  "commit": "22ada6bbe4e66747dcf6ee121c20730685cf5b03",
  "tree": "b2f0734f53500f3899e503fb0b9f5add62fd3e2c",
  "parents": [
    "31ba6ead0d5083010698d9fc0d45c31a4ae1f61d"
  ],
  "author": {
    "name": "Paul-Antoine Arras",
    "email": "parras@baylibre.com",
    "time": "Thu Jun 18 18:40:22 2026 +0200"
  },
  "committer": {
    "name": "Paul-Antoine Arras",
    "email": "parras@baylibre.com",
    "time": "Wed Jun 24 15:24:42 2026 +0200"
  },
  "message": "openmp: Add barrier kind to GOMP_barrier and GOMP_barrier_cancel\n\nGOMP_barrier is called for at least three distinct purposes: implicit\nbarriers at the end of parallel/teams regions, implicit barriers at the\nend of worksharing constructs, and explicit `#pragma omp barrier\u0027\ndirectives. OMPT requires distinguishing these in its sync-region\ncallbacks.\n\nCreate new, semantically equivalent functions GOMP_barrier_ext and\nGOMP_barrier_cancel_ext with an integer `kind\u0027 parameter. Update all compiler\ncall sites to pass the appropriate constant. Preserve now unused functions\nGOMP_barrier and GOMP_barrier_cancel for backward compatibility.\n\nThe `kind\u0027 parameter is accepted but not yet acted upon in libgomp; it\nis reserved for future OMPT instrumentation.\n\ngcc/c-family/ChangeLog:\n\n\t* c-omp.cc (c_finish_omp_barrier): Pass GOMP_BARRIER_EXPLICIT to\n\tGOMP_barrier_ext.\n\ngcc/cp/ChangeLog:\n\n\t* semantics.cc (finish_omp_barrier): Push GOMP_BARRIER_EXPLICIT\n\tonto the argument vector.\n\ngcc/fortran/ChangeLog:\n\n\t* trans-openmp.cc (gfc_trans_omp_barrier): Pass GOMP_BARRIER_EXPLICIT\n\tto GOMP_barrier_ext.\n\ngcc/ChangeLog:\n\n\t* omp-builtins.def (BUILT_IN_GOMP_BARRIER): Change function to\n\tGOMP_barrier_ext and type to BT_FN_VOID_INT.\n\t(BUILT_IN_GOMP_BARRIER_CANCEL): Change function to\n\tGOMP_barrier_cancel_ext and type to BT_FN_VOID_INT.\n\t* omp-expand.cc (expand_omp_for_static_nochunk): Pass\n\tGOMP_BARRIER_IMPLICIT_WORKSHARE to omp_build_barrier.\n\t(expand_omp_for_static_chunk): Likewise.\n\t(expand_omp_single): Likewise.\n\t* omp-general.cc (omp_build_barrier): Add kind parameter; pass it\n\tto GOMP_barrier_ext or GOMP_barrier_cancel_ext.\n\t* omp-general.h (omp_build_barrier): Update declaration to add\n\tkind parameter.\n\t* omp-low.cc (lower_rec_input_clauses): Determine barrier kind from\n\tthe enclosing gimple statement code and pass it to omp_build_barrier.\n\t(lower_omp_for_scan): Pass GOMP_BARRIER_IMPLICIT_WORKSHARE to\n\tomp_build_barrier.\n\ninclude/ChangeLog:\n\n\t* gomp-constants.h (GOMP_BARRIER_IMPLICIT_PARALLEL): New macro.\n\t(GOMP_BARRIER_IMPLICIT_WORKSHARE): New macro.\n\t(GOMP_BARRIER_EXPLICIT): New macro.\n\nlibgomp/ChangeLog:\n\n\t* barrier.c (GOMP_barrier_ext): New function.\n\t(GOMP_barrier_cancel_ext): Likewise.\n\t* libgomp_g.h (GOMP_barrier_ext): Declare.\n\t(GOMP_barrier_cancel_ext): Likewise.\n\t* libgomp.map (GOMP_6.0.2): Add GOMP_barrier_ext and\n\tGOMP_barrier_cancel_ext.\n\t* testsuite/libgomp.c/barrier-1.c: Update GOMP_barrier_ext calls to pass\n\tGOMP_BARRIER_EXPLICIT.\n\ngcc/testsuite/ChangeLog:\n\n\t* g++.dg/gomp/barrier-1.C: Update scan dump.\n\t* g++.dg/gomp/tpl-barrier-1.C: Likewise.\n\t* gcc.dg/gomp/barrier-1.c: Likewise.\n\t* c-c++-common/gomp/implicit-barrier-1.c: New test.\n\t* gfortran.dg/gomp/lastprivate-allocatable-barrier-1.f90: New test.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "181dfb3c7b7be7c739627d831bcf8c1fa989e7bc",
      "old_mode": 33188,
      "old_path": "gcc/c-family/c-omp.cc",
      "new_id": "006e54d1e3d985553454eb435446d9db5824ceaa",
      "new_mode": 33188,
      "new_path": "gcc/c-family/c-omp.cc"
    },
    {
      "type": "modify",
      "old_id": "684c6550345bc11b7520302ce804368c9cb06401",
      "old_mode": 33188,
      "old_path": "gcc/cp/semantics.cc",
      "new_id": "3a7e19c190a4de6215aeda6c64c9094fba1475ca",
      "new_mode": 33188,
      "new_path": "gcc/cp/semantics.cc"
    },
    {
      "type": "modify",
      "old_id": "0f368d3d805e541c0aa806207fbe424e54452473",
      "old_mode": 33188,
      "old_path": "gcc/fortran/trans-openmp.cc",
      "new_id": "8d5842685a55f8b7e5ea5271e7a49eb448093513",
      "new_mode": 33188,
      "new_path": "gcc/fortran/trans-openmp.cc"
    },
    {
      "type": "modify",
      "old_id": "82736e773407b6c9bdd7b01b38ee0bfc273bc811",
      "old_mode": 33188,
      "old_path": "gcc/omp-builtins.def",
      "new_id": "0a9dde8f6187d2b5dff8bb1177998f3ab72a0280",
      "new_mode": 33188,
      "new_path": "gcc/omp-builtins.def"
    },
    {
      "type": "modify",
      "old_id": "de8889a96496f016e6dca7db103469c8c5d544bc",
      "old_mode": 33188,
      "old_path": "gcc/omp-expand.cc",
      "new_id": "3d799d2803295dada49c4e871a76590eff2db7b8",
      "new_mode": 33188,
      "new_path": "gcc/omp-expand.cc"
    },
    {
      "type": "modify",
      "old_id": "d0307aeba88bee08c616c3b22c54759797220b7e",
      "old_mode": 33188,
      "old_path": "gcc/omp-general.cc",
      "new_id": "564fe858cdd48cc6a274cecb39e094081dcf6a92",
      "new_mode": 33188,
      "new_path": "gcc/omp-general.cc"
    },
    {
      "type": "modify",
      "old_id": "a5126269650c8f8b4415f1362e6e63b61130e0bc",
      "old_mode": 33188,
      "old_path": "gcc/omp-general.h",
      "new_id": "ebfe16d0a4fead546b94fbd5bd8aae759293e0a8",
      "new_mode": 33188,
      "new_path": "gcc/omp-general.h"
    },
    {
      "type": "modify",
      "old_id": "9ac0da173a514f7d5bc206a52ee8d7cce31cd488",
      "old_mode": 33188,
      "old_path": "gcc/omp-low.cc",
      "new_id": "30a4d02f2e20f4a60213c06e9f81a46604f0bce3",
      "new_mode": 33188,
      "new_path": "gcc/omp-low.cc"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d53b424233f607315244594b1f308213bc271046",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/c-c++-common/gomp/implicit-barrier-1.c"
    },
    {
      "type": "modify",
      "old_id": "55f3035193eccac932cb4e2082435c92810b7545",
      "old_mode": 33188,
      "old_path": "gcc/testsuite/g++.dg/gomp/barrier-1.C",
      "new_id": "a601d85669f535fadc1c41d3654d3f0d1c53f4cb",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/g++.dg/gomp/barrier-1.C"
    },
    {
      "type": "modify",
      "old_id": "b45cb1ee5cca07d865e4030473ea8176d67c0abd",
      "old_mode": 33188,
      "old_path": "gcc/testsuite/g++.dg/gomp/tpl-barrier-1.C",
      "new_id": "f198cddb556837ce01620ae3a1bbe1d9187a2486",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/g++.dg/gomp/tpl-barrier-1.C"
    },
    {
      "type": "modify",
      "old_id": "42c70e91163b153e07b113f7443ad52ccbeffb92",
      "old_mode": 33188,
      "old_path": "gcc/testsuite/gcc.dg/gomp/barrier-1.c",
      "new_id": "be874d38503b761f816441bea1d771f96de0e589",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.dg/gomp/barrier-1.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "48499f6a4c8b010187f61485881d5110bacfe784",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gfortran.dg/gomp/lastprivate-allocatable-barrier-1.f90"
    },
    {
      "type": "modify",
      "old_id": "def838a949d45c72f766993c210a0a354a22aeb1",
      "old_mode": 33188,
      "old_path": "include/gomp-constants.h",
      "new_id": "32bdedc9c4a8cbbd7fdb2717b6cd03cf1e0e5beb",
      "new_mode": 33188,
      "new_path": "include/gomp-constants.h"
    },
    {
      "type": "modify",
      "old_id": "3a6037e43552eb755f21f3b8a0b0f2a3239f7175",
      "old_mode": 33188,
      "old_path": "libgomp/barrier.c",
      "new_id": "d11fd710b19349cd7165b876b2b52dcaf45ce397",
      "new_mode": 33188,
      "new_path": "libgomp/barrier.c"
    },
    {
      "type": "modify",
      "old_id": "4aa518ecdae72e567a803d1a51bb61e951918bb4",
      "old_mode": 33188,
      "old_path": "libgomp/libgomp.map",
      "new_id": "92ef5c298f4d9d6ee5e8dfc4b5c7d4ae74dc6fc4",
      "new_mode": 33188,
      "new_path": "libgomp/libgomp.map"
    },
    {
      "type": "modify",
      "old_id": "6dc1fd46fcea531b084c82cfc0aeca243e8f51f5",
      "old_mode": 33188,
      "old_path": "libgomp/libgomp_g.h",
      "new_id": "89ed7b3462e33afe8f77ccbe5eefc7c55decea1e",
      "new_mode": 33188,
      "new_path": "libgomp/libgomp_g.h"
    },
    {
      "type": "modify",
      "old_id": "1f8d1f0d3f987410a7df865d45167a67e2484636",
      "old_mode": 33188,
      "old_path": "libgomp/testsuite/libgomp.c/barrier-1.c",
      "new_id": "1fe678a0a0932f7a5ea4c4f81d701e88d944a18d",
      "new_mode": 33188,
      "new_path": "libgomp/testsuite/libgomp.c/barrier-1.c"
    }
  ]
}
