[all-commits] [llvm/llvm-project] fad06a: [MLIR][OpenMP][OMPIRBuilder] Improve shared memory...
Sergio Afonso via All-commits
all-commits at lists.llvm.org
Mon Apr 27 05:15:27 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fad06a418b4f89510a390c215218f1ab8de0ecad
https://github.com/llvm/llvm-project/commit/fad06a418b4f89510a390c215218f1ab8de0ecad
Author: Sergio Afonso <safonsof at amd.com>
Date: 2026-04-27 (Mon, 27 Apr 2026)
Changed paths:
M flang/test/Integration/OpenMP/target-use-device-nested.f90
M flang/test/Integration/OpenMP/threadprivate-target-device.f90
M llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
M llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
M mlir/test/Target/LLVMIR/omptarget-constant-alloca-raise.mlir
M mlir/test/Target/LLVMIR/omptarget-parallel-llvm.mlir
A mlir/test/Target/LLVMIR/openmp-target-private-shared-mem.mlir
A offload/test/offloading/fortran/target-generic-outlined-loops.f90
Log Message:
-----------
[MLIR][OpenMP][OMPIRBuilder] Improve shared memory checks (#161864)
This patch refines checks to decide whether to use device shared memory
or regular stack allocations. In particular, it adds support for
parallel regions residing on standalone target device functions.
The changes are:
- Shared memory is introduced for `omp.target` implicit allocations,
such as those related to privatization and mapping, as long as they are
shared across threads in a nested parallel region.
- Standalone target device functions are interpreted as being part of a
Generic kernel, since the fact that they are present in the module after
filtering means they must be reachable from a target region.
- Prevent allocations whose only shared uses inside of an `omp.parallel`
region are as part of a `private` clause from being moved to device
shared memory.
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