Skip to content

Commit 37e27a4

Browse files
[llvm-exegesis] Add support for alderlake (#88967)
This patch adds the PFM counter definitions for Intel alderlake CPUs.
1 parent 579d301 commit 37e27a4

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

llvm/lib/Target/X86/X86PfmCounters.td

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,22 @@ def : PfmCountersBinding<"icelake-server", IceLakePfmCounters>;
204204
def : PfmCountersBinding<"rocketlake", IceLakePfmCounters>;
205205
def : PfmCountersBinding<"tigerlake", IceLakePfmCounters>;
206206

207+
def AlderLakePfmCounters : ProcPfmCounters {
208+
let CycleCounter = UnhaltedCoreCyclesPfmCounter;
209+
let UopsCounter = UopsIssuedPfmCounter;
210+
let IssueCounters = [
211+
PfmIssueCounter<"ADLPPort00", "uops_dispatched_port:port_0">,
212+
PfmIssueCounter<"ADLPPort01", "uops_dispatched_port:port_1">,
213+
PfmIssueCounter<"ADLPPort02_03_10", "uops_dispatched_port:port_2_3_10">,
214+
PfmIssueCounter<"ADLPPort04_09", "uops_dispatched_port:port_4_9">,
215+
PfmIssueCounter<"ADLPPort05_11", "uops_dispatched_port:port_5_11">,
216+
PfmIssueCounter<"ADLPPort06", "uops_dispatched_port:port_6">,
217+
PfmIssueCounter<"ADLPPort07_08", "uops_dispatched_port:port_7_8">
218+
];
219+
let ValidationCounters = DefaultIntelPfmValidationCounters;
220+
}
221+
def : PfmCountersBinding<"alderlake", AlderLakePfmCounters>;
222+
207223
// AMD X86 Counters.
208224
defvar DefaultAMDPfmValidationCounters = [
209225
PfmValidationCounter<InstructionRetired, "RETIRED_INSTRUCTIONS">,

llvm/lib/Target/X86/X86SchedAlderlakeP.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ def ADLPPort01_05_10 : ProcResGroup<[ADLPPort01, ADLPPort05, ADLPPort10]>;
6060
def ADLPPort02_03 : ProcResGroup<[ADLPPort02, ADLPPort03]>;
6161
def ADLPPort02_03_07 : ProcResGroup<[ADLPPort02, ADLPPort03, ADLPPort07]>;
6262
def ADLPPort02_03_11 : ProcResGroup<[ADLPPort02, ADLPPort03, ADLPPort11]>;
63+
def ADLPPort02_03_10 : ProcResGroup<[ADLPPort02, ADLPPort03, ADLPPort10]>;
64+
def ADLPPort05_11 : ProcResGroup<[ADLPPort05, ADLPPort11]>;
6365
def ADLPPort07_08 : ProcResGroup<[ADLPPort07, ADLPPort08]>;
6466

6567
// EU has 112 reservation stations.
@@ -79,6 +81,10 @@ def ADLPPort02_03_07_08_11 : ProcResGroup<[ADLPPort02, ADLPPort03, ADLPPort07,
7981
let BufferSize = 72;
8082
}
8183

84+
def ADLPPortAny : ProcResGroup<[ADLPPort00, ADLPPort01, ADLPPort02, ADLPPort03,
85+
ADLPPort04, ADLPPort05, ADLPPort06, ADLPPort07,
86+
ADLPPort08, ADLPPort09, ADLPPort10, ADLPPort11]>;
87+
8288
// Integer loads are 5 cycles, so ReadAfterLd registers needn't be available
8389
// until 5 cycles after the memory operand.
8490
def : ReadAdvance<ReadAfterLd, 5>;

0 commit comments

Comments
 (0)