[llvm] [AMDGPU] Improve debug printing of regunits in SIInsertWaitcnts (PR #210066)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 16 07:11:21 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Jay Foad (jayfoad)
<details>
<summary>Changes</summary>
Use the standard printRegUnit helper.
---
Full diff: https://github.com/llvm/llvm-project/pull/210066.diff
1 Files Affected:
- (modified) llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp (+4-2)
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
index 5996cdf42a956..e9ad515968ae3 100644
--- a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
@@ -1143,7 +1143,8 @@ void WaitcntBrackets::print(raw_ostream &OS) const {
continue;
unsigned RelScore = RegScore - LB - 1;
if (ID < REGUNITS_END) {
- OS << ' ' << RelScore << ":vRU" << ID;
+ OS << ' ' << RelScore << ':'
+ << printRegUnit(static_cast<MCRegUnit>(ID), &Context->TRI);
} else {
assert(ID >= LDSDMA_BEGIN && ID < LDSDMA_END &&
"Unhandled/unexpected ID value!");
@@ -1160,7 +1161,8 @@ void WaitcntBrackets::print(raw_ostream &OS) const {
if (RegScore <= LB)
continue;
unsigned RelScore = RegScore - LB - 1;
- OS << ' ' << RelScore << ":sRU" << static_cast<unsigned>(ID);
+ OS << ' ' << RelScore << ':'
+ << printRegUnit(static_cast<MCRegUnit>(ID), &Context->TRI);
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/210066
More information about the llvm-commits
mailing list