[llvm] AMDGPU: share LDS budget logic and add experimental LDS buffering pass (PR #166388)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 4 17:58:48 PST 2025


================
@@ -0,0 +1,146 @@
+//===-- AMDGPULDSUtils.cpp - AMDGPU LDS utilities ------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Shared helpers for computing LDS usage and limits for an AMDGPU function.
+//
+//===----------------------------------------------------------------------===//
+
+#include "Utils/AMDGPULDSUtils.h"
+
+#include "AMDGPU.h"
+#include "GCNSubtarget.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/IR/Constants.h"
+#include "llvm/IR/DataLayout.h"
+#include "llvm/IR/Function.h"
+#include "llvm/IR/GlobalVariable.h"
+#include "llvm/IR/Instructions.h"
+#include "llvm/IR/Module.h"
+#include "llvm/Support/Alignment.h"
+
+using namespace llvm;
+
+AMDGPULDSBudget llvm::computeLDSBudget(const Function &F,
----------------
arsenm wrote:

Probably should be AMDGPU namespace 

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


More information about the llvm-commits mailing list