[all-commits] [llvm/llvm-project] 3a6bfc: [OpenMPOpt] Merge parallel regions

Giorgis Georgakoudis via All-commits all-commits at lists.llvm.org
Fri Oct 9 09:59:26 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3a6bfcf2f902341bb618c4d5e06b2b10d9f02c72
      https://github.com/llvm/llvm-project/commit/3a6bfcf2f902341bb618c4d5e06b2b10d9f02c72
  Author: Giorgis Georgakoudis <georgakoudis1 at llnl.gov>
  Date:   2020-10-09 (Fri, 09 Oct 2020)

  Changed paths:
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    A llvm/test/Transforms/OpenMP/parallel_region_merging.ll
    A llvm/test/Transforms/OpenMP/parallel_region_merging_legacy_pm.ll

  Log Message:
  -----------
  [OpenMPOpt] Merge parallel regions

There are cases that generated OpenMP code consists of multiple,
consecutive OpenMP parallel regions, either due to high-level
programming models, such as RAJA, Kokkos, lowering to OpenMP code, or
simply because the programmer parallelized code this way.  This
optimization merges consecutive parallel OpenMP regions to: (1) reduce
the runtime overhead of re-activating a team of threads; (2) enlarge the
scope for other OpenMP optimizations, e.g., runtime call deduplication
and synchronization elimination.

This implementation defensively merges parallel regions, only when they
are within the same BB and any in-between instructions are safe to
execute in parallel.

Reviewed By: jdoerfert

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




More information about the All-commits mailing list