================
@@ -1131,6 +1131,26 @@ struct Waitcnt {
friend raw_ostream &operator<<(raw_ostream &OS, const AMDGPU::Waitcnt &Wait);
};
+/// Represents the hardware counter limits for different wait count types.
+struct HardwareLimits {
+ unsigned LoadcntMax; // Corresponds to Vmcnt prior to gfx12.
+ unsigned ExpcntMax;
+ unsigned DscntMax; // Corresponds to LGKMcnt prior to gfx12.
+ unsigned StorecntMax; // Corresponds to VScnt in gfx10/gfx11.
+ unsigned SamplecntMax; // gfx12+ only.
+ unsigned BvhcntMax; // gfx12+ only.
+ unsigned KmcntMax; // gfx12+ only.
+ unsigned XcntMax; // gfx1250.
+ unsigned VaVdstMax; // gfx12+ expert mode only.
+ unsigned VmVsrcMax; // gfx12+ expert mode only.
+
+ HardwareLimits() = default;
+
+ /// Initializes hardware limits from ISA version.
+ /// \p HasExtendedWaitCounts should be true for gfx12+.
+ HardwareLimits(const IsaVersion &IV, bool HasExtendedWaitCounts);
----------------
jayfoad wrote:
It is silly to take HasExtendedWaitCounts as a separate parameter when it can
be derived from IV.
https://github.com/llvm/llvm-project/pull/169345
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits