[all-commits] [llvm/llvm-project] dc7296: [OpenMP][FIX] Do not dereference a potential nullptr

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Wed Oct 27 16:19:01 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dc72960967d7a440d0dfd30bbc70e4131ca5e239
      https://github.com/llvm/llvm-project/commit/dc72960967d7a440d0dfd30bbc70e4131ca5e239
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-10-27 (Wed, 27 Oct 2021)

  Changed paths:
    M openmp/libomptarget/DeviceRTL/src/State.cpp

  Log Message:
  -----------
  [OpenMP][FIX] Do not dereference a potential nullptr

The first thread state in the new GPU runtime doesn't have a previous
one and we should not dereference the nullptr placeholder.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D111946


  Commit: 4c88341d17f8b81e4d21a63e0e4c16dca9063670
      https://github.com/llvm/llvm-project/commit/4c88341d17f8b81e4d21a63e0e4c16dca9063670
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-10-27 (Wed, 27 Oct 2021)

  Changed paths:
    M openmp/libomptarget/DeviceRTL/src/State.cpp

  Log Message:
  -----------
  [OpenMP][FIX] Do check the level before return team size

The team size could/should be an ICV but since we know it is either 1 or
a value we can leave it in the team state for now. However, we still
need to determine if the current level is nested before we use it.

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D111949


  Commit: ef922c692fdb971497d79cc8fa6b9d221733db3d
      https://github.com/llvm/llvm-project/commit/ef922c692fdb971497d79cc8fa6b9d221733db3d
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-10-27 (Wed, 27 Oct 2021)

  Changed paths:
    M openmp/libomptarget/DeviceRTL/src/Workshare.cpp

  Log Message:
  -----------
  [OpenMP][FIX] Query proper thread ID information to support nesting

The OpenMP thread ID is not the hardware thread ID if we have nesting.
We need to ask the runtime properly to ensure correct results.

Note that the loop interface is going to change soon so we do not adjust
it now but simply ignore the extra argument.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D111950


Compare: https://github.com/llvm/llvm-project/compare/b291597112f3...ef922c692fdb


More information about the All-commits mailing list