Skip to content

Commit

Permalink
[NFC] Use std::move to avoid copy (llvm#113080)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek-kaushik22 authored Nov 5, 2024
1 parent aef0e77 commit 6b64f36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/lib/CodeGen/MachineLICM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,8 @@ bool MachineLICMImpl::IsProfitableToHoist(MachineInstr &MI,
}) &&
IsLoopInvariantInst(MI, CurLoop) &&
any_of(MRI->use_nodbg_instructions(DefReg),
[&CurLoop, this, DefReg, Cost](MachineInstr &UseMI) {
[&CurLoop, this, DefReg,
Cost = std::move(Cost)](MachineInstr &UseMI) {
if (!CurLoop->contains(&UseMI))
return false;

Expand Down

0 comments on commit 6b64f36

Please sign in to comment.