[llvm] [CalcSpillWeights] Simplify copy hint register collection. NFC. (PR #114236)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 30 07:13:28 PDT 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 c4e135ec04a2bef5d5a5a69dfbb069a15dbf2f5e 9d575a5e799b187763318e43299b700425ee664e --extensions cpp -- llvm/lib/CodeGen/CalcSpillWeights.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/CalcSpillWeights.cpp b/llvm/lib/CodeGen/CalcSpillWeights.cpp
index 4cc7fa149e..efc07cbd4c 100644
--- a/llvm/lib/CodeGen/CalcSpillWeights.cpp
+++ b/llvm/lib/CodeGen/CalcSpillWeights.cpp
@@ -277,8 +277,7 @@ float VirtRegAuxInfo::weightCalcHelper(LiveInterval &LI, SlotIndex *Start,
SmallVector<std::pair<float, Register>, 4> FRegHints, VRegHints;
for (const auto &[Reg, Weight] : Hint) {
if (Reg != SkipReg)
- (Reg.isPhysical() ? &FRegHints : &VRegHints)
- ->emplace_back(Weight, Reg);
+ (Reg.isPhysical() ? &FRegHints : &VRegHints)->emplace_back(Weight, Reg);
}
auto HeavyFirst = [](const auto &LHS, const auto &RHS) {
if (LHS.first != RHS.first)
``````````
</details>
https://github.com/llvm/llvm-project/pull/114236
More information about the llvm-commits
mailing list