[llvm-branch-commits] [flang] [Flang][OpenMP] Add pass to replace allocas with device shared memory (PR #161863)

Michael Kruse via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Oct 6 04:30:09 PDT 2025


https://github.com/Meinersbur commented:

>    This ensures that explicit private allocations, intended to be shared across
>    threads, use the proper memory space on a target device while supporting the
>    case of parallel regions indirectly reached from within a target region via
>    function calls.

I don't yet understand the necessity of this. When lowering `fir.alloca`, wouldn't OpenMPToLLVMIRLowering automatically select the appropriate memory space?
To be usable in indirectably reached regions, the adress mlir::Value has to be passed to it in either case, why is it relevat?

https://github.com/llvm/llvm-project/pull/161863


More information about the llvm-branch-commits mailing list