[llvm] [llvm-exegesis] Add support for alder lake (PR #88967)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 12:15:28 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-x86

Author: Aiden Grossman (boomanaiden154)

<details>
<summary>Changes</summary>

This patch adds the PFM counter definitions for Intel alder lake CPUs.

---
Full diff: https://github.com/llvm/llvm-project/pull/88967.diff


1 Files Affected:

- (modified) llvm/lib/Target/X86/X86PfmCounters.td (+21) 


``````````diff
diff --git a/llvm/lib/Target/X86/X86PfmCounters.td b/llvm/lib/Target/X86/X86PfmCounters.td
index d87a559aa353b1..11846477e64ae0 100644
--- a/llvm/lib/Target/X86/X86PfmCounters.td
+++ b/llvm/lib/Target/X86/X86PfmCounters.td
@@ -204,6 +204,27 @@ def : PfmCountersBinding<"icelake-server", IceLakePfmCounters>;
 def : PfmCountersBinding<"rocketlake", IceLakePfmCounters>;
 def : PfmCountersBinding<"tigerlake", IceLakePfmCounters>;
 
+def AlderLakePfmCounters : ProcPfmCounters {
+  let CycleCounter = UnhaltedCoreCyclesPfmCounter;
+  let UopsCounter = UopsIssuedPfmCounter;
+  let IssueCounters = [
+    PfmIssueCounter<"ADLPPort00", "uops_dispatched_port:port_0">,
+    PfmIssueCounter<"ADLPPort01", "uops_dispatched_port:port_1">,
+    PfmIssueCounter<"ADLPPort02", "uops_dispatched_port:port_2_3_10">,
+    PfmIssueCounter<"ADLPPort03", "uops_dispatched_port:port_2_3_10">,
+    PfmIssueCounter<"ADLPPort04", "uops_dispatched_port:port_4_9">,
+    PfmIssueCounter<"ADLPPort05", "uops_dispatched_port:port_5_11">,
+    PfmIssueCounter<"ADLPPort06", "uops_dispatched_port:port_6">,
+    PfmIssueCounter<"ADLPPort07", "uops_dispatched_port:port_7_8">,
+    PfmIssueCounter<"ADLPPort08", "uops_dispatched_port:port_7_8">,
+    PfmIssueCounter<"ADLPPort09", "uops_dispatched_port:port_4_9">,
+    PfmIssueCounter<"ADLPPort10", "uops_dispatched_port:port_2_3_10">,
+    PfmIssueCounter<"ADLPPort11", "uops_dispatched_port:port_5_11">,
+  ];
+  let ValidationCounters = DefaultIntelPfmValidationCounters;
+}
+def : PfmCountersBinding<"alderlake", AlderLakePfmCounters>;
+
 // AMD X86 Counters.
 defvar DefaultAMDPfmValidationCounters = [
   PfmValidationCounter<InstructionRetired, "RETIRED_INSTRUCTIONS">,

``````````

</details>


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


More information about the llvm-commits mailing list