[llvm] [Exegesis][AArch64] Use more generic cycles counter (PR #133376)

Roman Belenov via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 30 07:41:55 PDT 2025


https://github.com/r-belenov updated https://github.com/llvm/llvm-project/pull/133376

>From a5e4d42d29818c98db58cc6c55f30cbf48d640ca Mon Sep 17 00:00:00 2001
From: r-belenov <103195329+r-belenov at users.noreply.github.com>
Date: Fri, 28 Mar 2025 09:17:54 +0300
Subject: [PATCH 1/2] Update AArch64PfmCounters.td

Change counter name to more generic one
---
 llvm/lib/Target/AArch64/AArch64PfmCounters.td | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Target/AArch64/AArch64PfmCounters.td b/llvm/lib/Target/AArch64/AArch64PfmCounters.td
index b1d1664e3f1b1..c7132b40ca2fe 100644
--- a/llvm/lib/Target/AArch64/AArch64PfmCounters.td
+++ b/llvm/lib/Target/AArch64/AArch64PfmCounters.td
@@ -10,7 +10,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-def CpuCyclesPfmCounter : PfmCounter<"CPU_CYCLES">;
+def CpuCyclesPfmCounter : PfmCounter<"CYCLES">;
 
 def DefaultPfmCounters : ProcPfmCounters {
   let CycleCounter = CpuCyclesPfmCounter;

>From 3e2fd08468cd9b81b2d92d0d1cd0daef7981e234 Mon Sep 17 00:00:00 2001
From: r-belenov <103195329+r-belenov at users.noreply.github.com>
Date: Fri, 28 Mar 2025 09:20:09 +0300
Subject: [PATCH 2/2] Update TargetTest.cpp

Update the test according to the change in the code
---
 llvm/unittests/tools/llvm-exegesis/AArch64/TargetTest.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/unittests/tools/llvm-exegesis/AArch64/TargetTest.cpp b/llvm/unittests/tools/llvm-exegesis/AArch64/TargetTest.cpp
index 71675d9f46739..ca5416eef39d5 100644
--- a/llvm/unittests/tools/llvm-exegesis/AArch64/TargetTest.cpp
+++ b/llvm/unittests/tools/llvm-exegesis/AArch64/TargetTest.cpp
@@ -65,7 +65,7 @@ TEST_F(AArch64TargetTest, SetRegToConstant) {
 }
 
 TEST_F(AArch64TargetTest, DefaultPfmCounters) {
-  const std::string Expected = "CPU_CYCLES";
+  const std::string Expected = "CYCLES";
   EXPECT_EQ(ExegesisTarget_->getPfmCounters("").CycleCounter, Expected);
   EXPECT_EQ(ExegesisTarget_->getPfmCounters("unknown_cpu").CycleCounter,
             Expected);



More information about the llvm-commits mailing list