[llvm] 00a2d6e - [llvm-exegesis][X86] Add memory pipe counters to SLM model

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 12 04:09:26 PST 2022


Author: Simon Pilgrim
Date: 2022-12-12T12:09:11Z
New Revision: 00a2d6e23d311b1459e326caa497834a6ccbda33

URL: https://github.com/llvm/llvm-project/commit/00a2d6e23d311b1459e326caa497834a6ccbda33
DIFF: https://github.com/llvm/llvm-project/commit/00a2d6e23d311b1459e326caa497834a6ccbda33.diff

LOG: [llvm-exegesis][X86] Add memory pipe counters to SLM model

There might not be any exposed alu pipe counters for us to measure - but the sum of load/store uop counters seems to give a really good approximation to memory controller usage - even for more complex instructions like cmpxchg

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86PfmCounters.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86PfmCounters.td b/llvm/lib/Target/X86/X86PfmCounters.td
index 9c4317886a35..6eccc1db2b20 100644
--- a/llvm/lib/Target/X86/X86PfmCounters.td
+++ b/llvm/lib/Target/X86/X86PfmCounters.td
@@ -45,6 +45,9 @@ def : PfmCountersBinding<"atom", AtomPfmCounters>;
 def SLMPfmCounters : ProcPfmCounters {
   let CycleCounter = UnhaltedCoreCyclesPfmCounter;
   let UopsCounter = PfmCounter<"uops_retired:any">;
+  let IssueCounters = [
+    PfmIssueCounter<"SLM_MEC_RSV", "mem_uop_retired:any_ld + mem_uop_retired:any_st">
+  ];
 }
 def : PfmCountersBinding<"silvermont", SLMPfmCounters>;
 def : PfmCountersBinding<"goldmont", SLMPfmCounters>;


        


More information about the llvm-commits mailing list