[Mlir-commits] [mlir] [mlir][openacc] Report private arrays placed in local memory (PR #224398)

Razvan Lupusoru llvmlistbot at llvm.org
Thu Sep 17 14:05:26 PDT 2026


================
@@ -865,6 +872,20 @@ bool ACCCGToGPULowering::tryAllocateSharedMemory(int64_t bytes) {
   return sharedMemBudget.tryAllocate(bytes);
 }
 
+void ACCCGToGPULowering::recordLocalMemPrivate(acc::PrivateLocalOp privateLocal,
+                                               MemRefType baseTy) {
+  if (baseTy.getRank() == 0)
----------------
razvanlupusoru wrote:

> Rank-0 privatizations are skipped because a private scalar is a register candidate rather than local memory.

I am just wondering if this filter is a good idea because at the time we report this, register allocation is not decided. I would imagine small arrays might also end up in registers, or some scalars may end up in local stack slots due to register limits. So maybe instead have no filter and have a message that communicates this more accurately?

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


More information about the Mlir-commits mailing list