[llvm] [AMDGPU][SIInsertWaitcnts][NFC] Common InstCounterType printer (PR #187559)
via llvm-commits
llvm-commits at lists.llvm.org
Mon May 4 08:47:58 PDT 2026
================
@@ -15,16 +15,19 @@ iota_range<InstCounterType> inst_counter_types(InstCounterType MaxCounter) {
return enum_seq(LOAD_CNT, MaxCounter);
}
-StringLiteral getInstCounterName(InstCounterType T) {
+StringLiteral getInstCounterName(InstCounterType T, bool HasExtendedWaitcnts) {
switch (T) {
case LOAD_CNT:
- return "LOAD_CNT";
+ return HasExtendedWaitcnts ? StringLiteral("LOAD_CNT")
+ : StringLiteral("VM_CNT");
case DS_CNT:
- return "DS_CNT";
+ return HasExtendedWaitcnts ? StringLiteral("DS_CNT")
----------------
vporpo wrote:
> This patch was very straightforward to generate and shows the entire unnecessary overhead of this PR.
Feel free to create a PR with this change, this is not what this PR is about. All this PR is doing is replacing the two identical printers with a single one.
> Seriously, why??? It's just a minor change in the debug out put.
Because what you are proposing is a matter of preference, and not everyone may agree with how these dumps may look like.
> I fully agree, let's just have the counter that matches the enum. The enum can then document the legacy names.
This can be discussed in the PR that actually does this change, this is not what this PR is about.
https://github.com/llvm/llvm-project/pull/187559
More information about the llvm-commits
mailing list