diff --git a/llvm/lib/Target/X86/X86PfmCounters.td b/llvm/lib/Target/X86/X86PfmCounters.td --- a/llvm/lib/Target/X86/X86PfmCounters.td +++ b/llvm/lib/Target/X86/X86PfmCounters.td @@ -223,3 +223,15 @@ ]; } def : PfmCountersBinding<"znver1", ZnVer1PfmCounters>; + +def ZnVer2PfmCounters : ProcPfmCounters { + let CycleCounter = PfmCounter<"cycles_not_in_halt">; + let UopsCounter = PfmCounter<"retired_uops">; + let IssueCounters = [ + // FIXME: In the current model, all three AGUs are considered the same, + // but only two are supposed to be able to compute load addresses. + PfmIssueCounter<"Zn2AGU", "ls_dispatch:ld_dispatch + ls_dispatch:store_dispatch">, + PfmIssueCounter<"Zn2Divider", "div_op_count"> + ]; +} +def : PfmCountersBinding<"znver2", ZnVer2PfmCounters>;