[all-commits] [llvm/llvm-project] db96df: [flang][FIRToMemRef] Treat heap-pointer allocas as...

Susan Tan (ス-ザン タン) via All-commits all-commits at lists.llvm.org
Wed Sep 16 09:47:32 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: db96dfae2a4fd74cb1dba7b4f9dec2dba4c83864
      https://github.com/llvm/llvm-project/commit/db96dfae2a4fd74cb1dba7b4f9dec2dba4c83864
  Author: Susan Tan (ス-ザン タン) <zujunt at nvidia.com>
  Date:   2026-09-16 (Wed, 16 Sep 2026)

  Changed paths:
    M flang/include/flang/Optimizer/Transforms/FIRToMemRefTypeConverter.h
    M flang/unittests/Optimizer/OpenACC/FIROpenACCPointerLikeTypeInterfaceTest.cpp

  Log Message:
  -----------
  [flang][FIRToMemRef] Treat heap-pointer allocas as static, not as dynamic arrays (#223821)

Whole-array assignment of an allocatable inside !$acc kernels with
-Mstack_arrays aborted on !fir.ref<!fir.heap<!fir.array<?xf32>>>. A
fir.alloca !fir.heap<array> is a local heap pointer, but it was
unwrapped and handled as a dynamic array. The memref converter then
peeled only the outer ref and asserted because !fir.heap is not a memref
element.

Keep the pointer as a static allocation. Make convertibleMemrefType use
the same one-pointer peel as convertMemrefType so a nested pointer is
not treated as an f32 array.



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