[all-commits] [llvm/llvm-project] 345338: [Flang][MLIR][OpenMP] Add explicit shared memory (...
Sergio Afonso via All-commits
all-commits at lists.llvm.org
Mon Apr 27 05:13:36 PDT 2026
Branch: refs/heads/users/skatrak/flang-generic-09-sharedmem-ops
Home: https://github.com/llvm/llvm-project
Commit: 34533893a8241a6d7a8a46b650c9244eb6d6f8fa
https://github.com/llvm/llvm-project/commit/34533893a8241a6d7a8a46b650c9244eb6d6f8fa
Author: Sergio Afonso <safonsof at amd.com>
Date: 2026-04-27 (Mon, 27 Apr 2026)
Changed paths:
M llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
M mlir/include/mlir/Dialect/OpenMP/OpenMPClauses.td
M mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
M mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
M mlir/test/Dialect/OpenMP/invalid.mlir
M mlir/test/Dialect/OpenMP/ops.mlir
A mlir/test/Target/LLVMIR/omptarget-device-shared-mem.mlir
Log Message:
-----------
[Flang][MLIR][OpenMP] Add explicit shared memory (de-)allocation ops
This patch introduces the `omp.alloc_shared_mem` and `omp.free_shared_mem`
operations to represent explicit allocations and deallocations of shared memory
across threads in a team, mirroring the existing `omp.target_allocmem` and
`omp.target_freemem`.
The `omp.alloc_shared_mem` op goes through the same Flang-specific
transformations as `omp.target_allocmem`, so that the size of the buffer can be
properly calculated when translating to LLVM IR.
The corresponding runtime functions produced for these new operations are
`__kmpc_alloc_shared` and `__kmpc_free_shared`, which previously could only be
created for implicit allocations (e.g. privatized and reduction variables).
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