[llvm] Resolve FIXME: use RegScavenger to find the best unused register (PR #78910)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 11:20:29 PST 2024


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 73ff017c9b39d8a1ecc350f0572e3274dd4c9146 5283ace558d901c1e4eaae57207d014f03dc19f9 -- llvm/lib/Target/AArch64/AArch64SpeculationHardening.cpp llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp llvm/lib/Target/Lanai/LanaiRegisterInfo.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/Lanai/LanaiRegisterInfo.cpp b/llvm/lib/Target/Lanai/LanaiRegisterInfo.cpp
index ff4f5b47da..8e4da33f48 100644
--- a/llvm/lib/Target/Lanai/LanaiRegisterInfo.cpp
+++ b/llvm/lib/Target/Lanai/LanaiRegisterInfo.cpp
@@ -165,7 +165,8 @@ bool LanaiRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
   if ((isSPLSOpcode(MI.getOpcode()) && !isInt<10>(Offset)) ||
       !isInt<16>(Offset)) {
     assert(RS && "Register scavenging must be on");
-    Register Reg = RS->scavengeRegisterBackwards(Lanai::GPRRegClass, II, false, SPAdj);
+    Register Reg =
+        RS->scavengeRegisterBackwards(Lanai::GPRRegClass, II, false, SPAdj);
     assert(Reg && "Register scavenger failed");
 
     bool HasNegOffset = false;

``````````

</details>


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


More information about the llvm-commits mailing list