[llvm] [AMDGPU] Using feature to define vmem cacheline size (PR #207884)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 13 02:34:45 PDT 2026
================
@@ -409,6 +409,15 @@ class SubtargetFeatureInstCacheLineSize <int Value> : SubtargetFeature <
def FeatureInstCacheLineSize64 : SubtargetFeatureInstCacheLineSize<64>;
def FeatureInstCacheLineSize128 : SubtargetFeatureInstCacheLineSize<128>;
+class SubtargetFeatureDataCacheLineSize <int Value> : SubtargetFeature <
+ "datacachelinesize"#Value,
+ "DataCacheLineSize",
+ !cast<string>(Value),
+ "Data (VMEM) cache line size in bytes."
+>;
+
+def FeatureDataCacheLineSize128 : SubtargetFeatureDataCacheLineSize<128>;
----------------
Shoreshen wrote:
Hi @ro-i , basically I think the pass (loop-data-prefetch) is trying to insert llvm.prefetch in the loop so that some rounds later, the data has already in the cache line.
This requires target support llvm.prefetch lower to vmem data prefetch instruction....
You can also see in the previous function, it comment that only apply for gfx12+
https://github.com/llvm/llvm-project/pull/207884
More information about the llvm-commits
mailing list