[all-commits] [llvm/llvm-project] 85ad56: [OpenMP] Avoid calling `isSPMDMode` during RT init...

Joseph Huber via All-commits all-commits at lists.llvm.org
Fri Oct 8 19:00:58 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 85ad56633593d011ab00f4eb431ffd879677bffc
      https://github.com/llvm/llvm-project/commit/85ad56633593d011ab00f4eb431ffd879677bffc
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2021-10-08 (Fri, 08 Oct 2021)

  Changed paths:
    M openmp/libomptarget/DeviceRTL/include/Mapping.h
    M openmp/libomptarget/DeviceRTL/src/Kernel.cpp
    M openmp/libomptarget/DeviceRTL/src/Mapping.cpp
    M openmp/libomptarget/DeviceRTL/src/Reduction.cpp

  Log Message:
  -----------
  [OpenMP] Avoid calling `isSPMDMode` during RT initialization

Until we hit the first barrier we should not call `mapping::isSPMDMode`
with all threads. Instead, we now have (and use during initialization) a
`mapping::isMainThreadInGenericMode` overload that takes the known
SPMD-mode state and one that queries it.

Reviewed By: tianshilei1992

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




More information about the All-commits mailing list