[llvm] Experiment/replace copy assign by move assign (PR #178169)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 27 03:52:59 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-analysis
Author: None (serge-sans-paille)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/178169.diff
3 Files Affected:
- (modified) llvm/lib/Analysis/IVDescriptors.cpp (+1-1)
- (modified) llvm/lib/Analysis/InlineCost.cpp (+1-1)
- (modified) llvm/lib/Analysis/LoopUnrollAnalyzer.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/Analysis/IVDescriptors.cpp b/llvm/lib/Analysis/IVDescriptors.cpp
index 3946a7ce8b8f6..74e276b1c836f 100644
--- a/llvm/lib/Analysis/IVDescriptors.cpp
+++ b/llvm/lib/Analysis/IVDescriptors.cpp
@@ -659,7 +659,7 @@ bool RecurrenceDescriptor::AddReductionVar(
RecurrenceDescriptor RD(RdxStart, ExitInstruction, IntermediateStore, Kind,
FMF, ExactFPMathInst, RecurrenceType, IsSigned,
IsOrdered, CastInsts, MinWidthCastToRecurrenceType);
- RedDes = RD;
+ RedDes = std::move(RD);
return true;
}
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index 0e49b1903d410..8e99a4c352454 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -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;
}
diff --git a/llvm/lib/Analysis/LoopUnrollAnalyzer.cpp b/llvm/lib/Analysis/LoopUnrollAnalyzer.cpp
index 9c78e2afaede7..7c8e300c016ba 100644
--- a/llvm/lib/Analysis/LoopUnrollAnalyzer.cpp
+++ b/llvm/lib/Analysis/LoopUnrollAnalyzer.cpp
@@ -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;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/178169
More information about the llvm-commits
mailing list