[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:27 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)
+    return;
+  std::string varName =
+      privateLocal ? accSupport.getVariableName(privateLocal.getResult())
+                   : std::string();
+  if (varName.empty())
----------------
razvanlupusoru wrote:

I am wondering if we should just not report these - these can be either user variables whose name we did not recover, but could also be compiler temps with no name. Having a message with a bunch of `local memory used for (*), (*)` is not automatically useful for reporting.

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


More information about the Mlir-commits mailing list