[llvm] b0468e3 - [X86] Add missing PFM port mappings for Core2/Nehalem
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 30 04:31:56 PST 2022
Author: Simon Pilgrim
Date: 2022-11-30T12:31:49Z
New Revision: b0468e3e228852d2b97de757e4513155726336da
URL: https://github.com/llvm/llvm-project/commit/b0468e3e228852d2b97de757e4513155726336da
DIFF: https://github.com/llvm/llvm-project/commit/b0468e3e228852d2b97de757e4513155726336da.diff
LOG: [X86] Add missing PFM port mappings for Core2/Nehalem
This was an old patch from when I was trying to improve pre-AVX scheduler support as part of D103695, we were missing port mappings entirely for these targets - although tbh they don't map well to the SandyBridge model that they currently use.
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 25fcba1a7581..9c4317886a35 100644
--- a/llvm/lib/Target/X86/X86PfmCounters.td
+++ b/llvm/lib/Target/X86/X86PfmCounters.td
@@ -34,11 +34,6 @@ def CorePfmCounters : ProcPfmCounters {
}
def : PfmCountersBinding<"yonah", CorePfmCounters>;
def : PfmCountersBinding<"prescott", CorePfmCounters>;
-def : PfmCountersBinding<"core2", CorePfmCounters>;
-def : PfmCountersBinding<"penryn", CorePfmCounters>;
-def : PfmCountersBinding<"nehalem", CorePfmCounters>;
-def : PfmCountersBinding<"corei7", CorePfmCounters>;
-def : PfmCountersBinding<"westmere", CorePfmCounters>;
def AtomPfmCounters : ProcPfmCounters {
let CycleCounter = UnhaltedCoreCyclesPfmCounter;
@@ -63,6 +58,35 @@ def KnightPfmCounters : ProcPfmCounters {
def : PfmCountersBinding<"knl", KnightPfmCounters>;
def : PfmCountersBinding<"knm", KnightPfmCounters>;
+def Core2PfmCounters : ProcPfmCounters {
+ let CycleCounter = UnhaltedCoreCyclesPfmCounter;
+ let UopsCounter = PfmCounter<"uops_retired:any">;
+ let IssueCounters = [
+ PfmIssueCounter<"SBPort0", "rs_uops_dispatched_cycles:port_0">,
+ PfmIssueCounter<"SBPort1", "rs_uops_dispatched_cycles:port_1">,
+ PfmIssueCounter<"SBPort23", "rs_uops_dispatched_cycles:port_2 + rs_uops_dispatched_cycles:port_3">,
+ PfmIssueCounter<"SBPort4", "rs_uops_dispatched_cycles:port_4">,
+ PfmIssueCounter<"SBPort5", "rs_uops_dispatched_cycles:port_5">
+ ];
+}
+def : PfmCountersBinding<"core2", Core2PfmCounters>;
+def : PfmCountersBinding<"penryn", Core2PfmCounters>;
+
+def NehalemPfmCounters : ProcPfmCounters {
+ let CycleCounter = UnhaltedCoreCyclesPfmCounter;
+ let UopsCounter = PfmCounter<"uops_retired:any">;
+ let IssueCounters = [
+ PfmIssueCounter<"SBPort0", "uops_executed:port0">,
+ PfmIssueCounter<"SBPort1", "uops_executed:port1">,
+ PfmIssueCounter<"SBPort23", "uops_executed:port2_core + uops_executed:port3_core">,
+ PfmIssueCounter<"SBPort4", "uops_executed:port4_core">,
+ PfmIssueCounter<"SBPort5", "uops_executed:port5">
+ ];
+}
+def : PfmCountersBinding<"nehalem", NehalemPfmCounters>;
+def : PfmCountersBinding<"corei7", NehalemPfmCounters>;
+def : PfmCountersBinding<"westmere", NehalemPfmCounters>;
+
def SandyBridgePfmCounters : ProcPfmCounters {
let CycleCounter = UnhaltedCoreCyclesPfmCounter;
let UopsCounter = UopsIssuedPfmCounter;
More information about the llvm-commits
mailing list