[all-commits] [llvm/llvm-project] 9ab167: [flang][acc] Implement PointerLikeType API gen[All...

Razvan Lupusoru via All-commits all-commits at lists.llvm.org
Fri Oct 17 07:51:45 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9ab16778c6e37e3d34e28b990bdb8839e5961805
      https://github.com/llvm/llvm-project/commit/9ab16778c6e37e3d34e28b990bdb8839e5961805
  Author: Razvan Lupusoru <razvan.lupusoru at gmail.com>
  Date:   2025-10-17 (Fri, 17 Oct 2025)

  Changed paths:
    M flang/include/flang/Optimizer/OpenACC/Support/FIROpenACCTypeInterfaces.h
    M flang/lib/Optimizer/OpenACC/Support/FIROpenACCTypeInterfaces.cpp
    A flang/test/Fir/OpenACC/pointer-like-interface-alloc.mlir
    A flang/test/Fir/OpenACC/pointer-like-interface-copy.mlir
    A flang/test/Fir/OpenACC/pointer-like-interface-free.mlir
    M flang/tools/fir-opt/CMakeLists.txt
    M flang/tools/fir-opt/fir-opt.cpp

  Log Message:
  -----------
  [flang][acc] Implement PointerLikeType API gen[Allocate/Free/Copy] (#163660)

Implements genAllocate, genFree, and genCopy for FIR pointer types
(fir.ref, fir.ptr, fir.heap, fir.llvm_ptr) in the OpenACC
PointerLikeType interface.

- genAllocate: Uses fir.alloca for stack types, fir.allocmem for heap
types. Returns null for dynamic/unknown types (unlimited polymorphic,
dynamic arrays, dynamic character lengths, box types).
- genFree: Generates fir.freemem for heap allocations. Returns false if
original allocation cannot be found.
- genCopy: Uses fir.load+fir.store for trivial types (scalars),
hlfir.assign for non-trivial types (arrays, derived types, characters).
Returns false for unsupported dynamic types and box types.

Adds comprehensive MLIR tests covering various FIR types and edge cases.



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