[llvm] [AMDGPU] Fix GCNUpwardRPTracker. (WIP) (PR #71186)

via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 3 07:35:49 PDT 2023


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 5c3beb7b1e26d38b0933a28432dfbce4e00cf329 e2254cb744adb65685edeb2373f900368c11c11a -- llvm/lib/Target/AMDGPU/GCNIterativeScheduler.cpp llvm/lib/Target/AMDGPU/GCNRegPressure.cpp llvm/lib/Target/AMDGPU/GCNRegPressure.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp b/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
index f191f3f08c56..7d65ee8c2644 100644
--- a/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
@@ -183,7 +183,7 @@ collectVirtualRegUses(SmallVectorImpl<RegisterMaskPair> &RegMaskPairs,
     });
     if (I != RegMaskPairs.end())
       continue;
-      
+
     LaneBitmask UseMask;
     auto &LI = LIS.getInterval(Reg);
     if (!LI.hasSubRanges())
diff --git a/llvm/lib/Target/AMDGPU/GCNRegPressure.h b/llvm/lib/Target/AMDGPU/GCNRegPressure.h
index 732ed33337d2..c9a678a01f95 100644
--- a/llvm/lib/Target/AMDGPU/GCNRegPressure.h
+++ b/llvm/lib/Target/AMDGPU/GCNRegPressure.h
@@ -180,11 +180,9 @@ public:
 
   const GCNRegPressure &getMaxPressure() const { return MaxPressure; }
 
-  void resetMaxPressure() {
-    MaxPressure = CurPressure;
-  }
+  void resetMaxPressure() { MaxPressure = CurPressure; }
 
-  GCNRegPressure getMaxPressureAndReset() { 
+  GCNRegPressure getMaxPressureAndReset() {
     GCNRegPressure RP = MaxPressure;
     resetMaxPressure();
     return RP;
@@ -234,8 +232,7 @@ LaneBitmask getLiveLaneMask(unsigned Reg,
 LaneBitmask getLiveLaneMask(const LiveInterval &LI, SlotIndex SI,
                             const MachineRegisterInfo &MRI);
 
-GCNRPTracker::LiveRegSet getLiveRegs(SlotIndex SI,
-                                     const LiveIntervals &LIS,
+GCNRPTracker::LiveRegSet getLiveRegs(SlotIndex SI, const LiveIntervals &LIS,
                                      const MachineRegisterInfo &MRI);
 
 /// creates a map MachineInstr -> LiveRegSet

``````````

</details>


https://github.com/llvm/llvm-project/pull/71186


More information about the llvm-commits mailing list