[llvm] GFX12: Add LoopDataPrefetchPass (PR #75625)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 17 23:00:39 PST 2023


================
@@ -1345,3 +1345,21 @@ GCNTTIImpl::getTypeLegalizationCost(Type *Ty) const {
   Cost.first += (Size + 255) / 256;
   return Cost;
 }
+
+unsigned GCNTTIImpl::getPrefetchDistance() const {
+  return ST->hasPrefetch() ? 128 : 0;
+}
+
+bool GCNTTIImpl::shouldPrefetchAddressSpace(unsigned AS) const {
+  switch (AS) {
----------------
arsenm wrote:

Just use isFlatGlobalAddrSpace?

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


More information about the llvm-commits mailing list