[llvm] Use `std::move` to avoid copy (PR #113080)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 4 04:34:27 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 e6c01432b6fb6077e1bdf2e0abf05d2c2dd3fd3e efe9ab956b018f59d2d2a6144f4a5cae1285efc3 --extensions cpp -- llvm/lib/CodeGen/MachineLICM.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp
index 34d531ba7a..dfac103f6a 100644
--- a/llvm/lib/CodeGen/MachineLICM.cpp
+++ b/llvm/lib/CodeGen/MachineLICM.cpp
@@ -1377,7 +1377,8 @@ bool MachineLICMImpl::IsProfitableToHoist(MachineInstr &MI,
}) &&
IsLoopInvariantInst(MI, CurLoop) &&
any_of(MRI->use_nodbg_instructions(DefReg),
- [&CurLoop, this, DefReg, Cost = std::move(Cost)](MachineInstr &UseMI) {
+ [&CurLoop, this, DefReg,
+ Cost = std::move(Cost)](MachineInstr &UseMI) {
if (!CurLoop->contains(&UseMI))
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/113080
More information about the llvm-commits
mailing list