[PATCH] D83676: AMDGPUPerhHintAnalysis: don't treat constant loads as large stride

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 06:13:13 PDT 2020


foad created this revision.
foad added reviewers: rampitec, nhaehnle, arsenm.
Herald added subscribers: llvm-commits, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, wdng, jvesely, kzhuravl.
Herald added a project: LLVM.

In the "large stride" heuristic ignore loads from the constant address
space (as well as local address space). K$ behavior is very different
from L0$ so it doesn't make much sense to use the same heuristic for
them.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83676

Files:
  llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp


Index: llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
@@ -333,6 +333,10 @@
   // Do not treat local-addr memory access as large stride.
   if (isLocalAddr(MO))
     return MAI;
+  // Do not treat constant-addr memory access as large stride because K$
+  // behavior is very different from L0$.
+  if (isConstantAddr(MO))
+    return MAI;
 
   MAI.V = MO;
   MAI.Base = GetPointerBaseWithConstantOffset(MO, MAI.Offset, *DL);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83676.277404.patch
Type: text/x-patch
Size: 603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200713/5b41d5d1/attachment.bin>


More information about the llvm-commits mailing list