[all-commits] [llvm/llvm-project] 560004: [Flang] [OpenMP] [MLIR] Add lowering support for O...

Raghu Maddhipatla via All-commits all-commits at lists.llvm.org
Tue Apr 14 10:45:14 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 560004b2b1f83f05b7380e515199ca8f1fc6d5f3
      https://github.com/llvm/llvm-project/commit/560004b2b1f83f05b7380e515199ca8f1fc6d5f3
  Author: Raghu Maddhipatla <7686592+raghavendhra at users.noreply.github.com>
  Date:   2026-04-14 (Tue, 14 Apr 2026)

  Changed paths:
    M flang/lib/Lower/OpenMP/ClauseProcessor.cpp
    M flang/lib/Lower/OpenMP/ClauseProcessor.h
    M flang/lib/Lower/OpenMP/OpenMP.cpp
    R flang/test/Lower/OpenMP/Todo/omp-declarative-allocate-align.f90
    R flang/test/Lower/OpenMP/Todo/omp-declarative-allocate.f90
    A flang/test/Lower/OpenMP/omp-declarative-allocate-align.f90
    A flang/test/Lower/OpenMP/omp-declarative-allocate.f90
    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/include/mlir/Target/LLVMIR/LLVMTranslationDialectInterface.td
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
    M mlir/test/Dialect/OpenMP/ops.mlir
    A mlir/test/Target/LLVMIR/openmp-allocate-directive.mlir

  Log Message:
  -----------
  [Flang] [OpenMP] [MLIR] Add lowering support for OMP ALLOCATE directives and its clauses (#187167)

This patch implementation is primarily focused on

- Lowering to LLVM IR, by generating appropriate kmpc_alloc() and kmpc_alligned_alloc() calls for variable(s) and before the end of scope generating kmpc_free() for the same variable(s).
- Also handled, usage of array variables in the OMP ALLOCATE directive.
- Define omp.allocate_free operation in MLIR and slight changes to existing MLIR definition of ALLOCATOR clause.
- Add test cases for variations of usage of OMP ALLOCATE directive and its clauses ALIGN and ALLOCATOR.



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