[all-commits] [llvm/llvm-project] 6f0296: [OMPIRBuilder] Don't outline DISTRIBUTE on CPUs (#...

Tom Eccles via All-commits all-commits at lists.llvm.org
Tue Sep 23 03:09:36 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6f029691646c697b7a00c02c39d530716f124c89
      https://github.com/llvm/llvm-project/commit/6f029691646c697b7a00c02c39d530716f124c89
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2025-09-23 (Tue, 23 Sep 2025)

  Changed paths:
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
    M mlir/test/Target/LLVMIR/openmp-cancel-distribute-parallel-loop.mlir
    M mlir/test/Target/LLVMIR/openmp-distribute-private.mlir
    M mlir/test/Target/LLVMIR/openmp-llvm.mlir
    M mlir/test/Target/LLVMIR/openmp-target-generic-spmd.mlir
    M mlir/test/Target/LLVMIR/openmp-target-spmd.mlir
    M mlir/test/Target/LLVMIR/openmp-teams-distribute-parallel-do-simd.mlir

  Log Message:
  -----------
  [OMPIRBuilder] Don't outline DISTRIBUTE on CPUs (#158317)

We use different OpenMP runtime functions on CPU and target offload. The
one used for DISTRIBUTE on target offload needs a function pointer to an
offloaded function, but the one on CPU doesn't. This caused unnessecary
overhead on CPUs because SHARED or FIRSTPRIVATE memory from the
surrounding context has to be packaged into a context structure just for
an ordinary function call (which would hopefully eventually get
inlined). This also makes the IR harder to read.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list