[llvm] [AMDGPU][SIInsertWaitCnts] Use RegUnits-based tracking (PR #162077)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 6 05:26:03 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
index dfcccf8cb..874101dac 100644
--- a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
@@ -1095,12 +1095,11 @@ void WaitcntBrackets::print(raw_ostream &OS) const {
break;
}
-
if (SR != 0) {
// Print vgpr scores.
unsigned LB = getScoreLB(T);
- for (auto &[ID, Info]: VMem) {
+ for (auto &[ID, Info] : VMem) {
unsigned RegScore = Info.Scores[T];
if (RegScore <= LB)
continue;
@@ -1114,10 +1113,10 @@ void WaitcntBrackets::print(raw_ostream &OS) const {
// Also need to print sgpr scores for lgkm_cnt or xcnt.
if (isSmemCounter(T)) {
- for (auto &[ID, Info]: SGPRs) {
+ for (auto &[ID, Info] : SGPRs) {
unsigned RegScore = Info.Scores[getSgprScoresIdx(T)];
if (RegScore <= LB)
- continue;
+ continue;
unsigned RelScore = RegScore - LB - 1;
OS << RelScore << ":sRU" << ID << " ";
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/162077
More information about the llvm-commits
mailing list