[all-commits] [llvm/llvm-project] 29a3e3: [OpenMPOpt] Expand SPMDization with guarding for t...

Giorgis Georgakoudis via All-commits all-commits at lists.llvm.org
Wed Aug 4 11:49:38 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 29a3e3dd7bedb5cfd50277882cfc8d4b6b07ee2f
      https://github.com/llvm/llvm-project/commit/29a3e3dd7bedb5cfd50277882cfc8d4b6b07ee2f
  Author: Giorgis Georgakoudis <georgakoudis1 at llnl.gov>
  Date:   2021-08-04 (Wed, 04 Aug 2021)

  Changed paths:
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    M llvm/test/Transforms/OpenMP/custom_state_machines.ll
    M llvm/test/Transforms/OpenMP/get_hardware_num_threads_in_block_fold.ll
    M llvm/test/Transforms/OpenMP/is_spmd_exec_mode_fold.ll
    M llvm/test/Transforms/OpenMP/remove_globalization.ll
    M llvm/test/Transforms/OpenMP/replace_globalization.ll
    M llvm/test/Transforms/OpenMP/spmdization.ll

  Log Message:
  -----------
  [OpenMPOpt] Expand SPMDization with guarding for target parallel regions

This patch expands SPMDization (converting generic execution mode to SPMD for target regions) by guarding code regions that should be executed only by the main thread. Specifically, it generates guarded regions, which only the main thread executes, and the synchronization with worker threads using simple barriers. For correctness, the patch aborts SPMDization for target regions if the same code executes in a parallel region, thus must be not be guarded. This check is implemented using the ParallelLevels AA.

Reviewed By: jhuber6

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




More information about the All-commits mailing list