Skip to content

Commit 6b64f36

Browse files
[NFC] Use std::move to avoid copy (#113080)
1 parent aef0e77 commit 6b64f36

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/CodeGen/MachineLICM.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,8 @@ bool MachineLICMImpl::IsProfitableToHoist(MachineInstr &MI,
13711371
}) &&
13721372
IsLoopInvariantInst(MI, CurLoop) &&
13731373
any_of(MRI->use_nodbg_instructions(DefReg),
1374-
[&CurLoop, this, DefReg, Cost](MachineInstr &UseMI) {
1374+
[&CurLoop, this, DefReg,
1375+
Cost = std::move(Cost)](MachineInstr &UseMI) {
13751376
if (!CurLoop->contains(&UseMI))
13761377
return false;
13771378

0 commit comments

Comments
 (0)