[llvm] 2ee17d6 - [llvm-exegesis][X86] Use the same AGU counter estimate mapping for znver1 as znver2, and count RMW ops as well
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 17 06:06:48 PST 2022
Author: Simon Pilgrim
Date: 2022-12-17T14:06:31Z
New Revision: 2ee17d691f4f34769b64fffc6fe704ae13667256
URL: https://github.com/llvm/llvm-project/commit/2ee17d691f4f34769b64fffc6fe704ae13667256
DIFF: https://github.com/llvm/llvm-project/commit/2ee17d691f4f34769b64fffc6fe704ae13667256.diff
LOG: [llvm-exegesis][X86] Use the same AGU counter estimate mapping for znver1 as znver2, and count RMW ops as well
znver2 can use the ld/st dispatch counters to make a reasonable estimate for the AGU usage (although it misses complex LEA ops which I don't think we can fix), although it wasn't accounting for RMW ld-st uops which are counted separately - the same approach can be used for znver1 (ymm double-pumping ld/st agu is correctly measured as 2uops)
This change is mainly academic, but was noticed as the znver1/2 models incorrectly assume scalar RMW ops take 2uops
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 ea165ba3ac62..d2460e12b005 100644
--- a/llvm/lib/Target/X86/X86PfmCounters.td
+++ b/llvm/lib/Target/X86/X86PfmCounters.td
@@ -262,6 +262,7 @@ def ZnVer1PfmCounters : ProcPfmCounters {
PfmIssueCounter<"ZnFPU1", "fpu_pipe_assignment:total1">,
PfmIssueCounter<"ZnFPU2", "fpu_pipe_assignment:total2">,
PfmIssueCounter<"ZnFPU3", "fpu_pipe_assignment:total3">,
+ PfmIssueCounter<"ZnAGU", "ls_dispatch:ld_st_dispatch + ls_dispatch:ld_dispatch + ls_dispatch:store_dispatch">,
PfmIssueCounter<"ZnDivider", "div_op_count">
];
}
@@ -271,7 +272,7 @@ def ZnVer2PfmCounters : ProcPfmCounters {
let CycleCounter = PfmCounter<"cycles_not_in_halt">;
let UopsCounter = PfmCounter<"retired_uops">;
let IssueCounters = [
- PfmIssueCounter<"Zn2AGU", "ls_dispatch:ld_dispatch + ls_dispatch:store_dispatch">,
+ PfmIssueCounter<"Zn2AGU", "ls_dispatch:ld_st_dispatch + ls_dispatch:ld_dispatch + ls_dispatch:store_dispatch">,
PfmIssueCounter<"Zn2Divider", "div_op_count">
];
}
More information about the llvm-commits
mailing list