[perf] Replace copy-assign by move-assign in llvm/lib/Analysis/* (#178169)

This commit is contained in:
serge-sans-paille 2026-02-02 21:26:49 +00:00 committed by GitHub
parent 84ef35b326
commit 5a4754d2ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 7 deletions

View file

@ -656,11 +656,10 @@ bool RecurrenceDescriptor::AddReductionVar(
// is saved as part of the RecurrenceDescriptor.
// Save the description of this reduction variable.
RecurrenceDescriptor RD(RdxStart, ExitInstruction, IntermediateStore, Kind,
FMF, ExactFPMathInst, RecurrenceType, IsSigned,
IsOrdered, CastInsts, MinWidthCastToRecurrenceType);
RedDes = RD;
RedDes =
RecurrenceDescriptor(RdxStart, ExitInstruction, IntermediateStore, Kind,
FMF, ExactFPMathInst, RecurrenceType, IsSigned,
IsOrdered, CastInsts, MinWidthCastToRecurrenceType);
return true;
}

View file

@ -1728,7 +1728,7 @@ bool CallAnalyzer::canFoldInboundsGEP(GetElementPtrInst &I) {
return false;
// Add the result as a new mapping to Base + Offset.
ConstantOffsetPtrs[&I] = BaseAndOffset;
ConstantOffsetPtrs[&I] = std::move(BaseAndOffset);
return true;
}

View file

@ -66,7 +66,7 @@ bool UnrolledInstAnalyzer::simplifyInstWithSCEV(Instruction *I) {
SimplifiedAddress Address;
Address.Base = Base->getValue();
Address.Offset = *Offset;
SimplifiedAddresses[I] = Address;
SimplifiedAddresses[I] = std::move(Address);
return false;
}