[llvm] [AMDGPU] Add stalls for DS FIFO buffer (PR #192323)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 1 19:02:47 PDT 2026


================
@@ -172,6 +177,25 @@ class HardwareUnitInfo {
   /// / MFMA instructions may take multiple cycles, which may be overlapped with
   /// instructions on other HardwareUnits.
   bool ProducesCoexecWindow = false;
+  /// How many instructions can be held simultaneously for this HardwareUnit.
+  /// A value of 0 means there is no limit.
+  ///
+  /// This may approximate the hardware. For example, for LDS instructions
+  /// it is a well-known phenomena that oversubscribing the LDS unit results in
+  /// longer latency for the LDS instructions. While it is true that there is a
+  /// hard limit to the amount of simulatenous in-flight LDS instructions, good
+  /// scheduling would also cool off the LDS to avoid other forms of hardware
+  /// contention and increasing LDS latency. Thus, we limit the amount of LDS
+  /// instructions we are willing to schedule close together, though this does
+  /// not correspond 1:1 with a hardware mechanism.
+  unsigned BufferSize = 0;
----------------
shiltian wrote:

Maybe just set this to 16 by default such that we don't really need the global variable.

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


More information about the llvm-commits mailing list