Skip to content

Commit 1605bf5

Browse files
[ConstraintElimination] Use std::move in the constructor (NFC) (#79259)
Moving the contents of Coefficients saves 0.43% of heap allocations during the compilation of a large preprocessed file, namely X86ISelLowering.cpp, for the X86 target.
1 parent e9311f9 commit 1605bf5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Scalar/ConstraintElimination.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ struct ConstraintTy {
231231

232232
ConstraintTy(SmallVector<int64_t, 8> Coefficients, bool IsSigned, bool IsEq,
233233
bool IsNe)
234-
: Coefficients(Coefficients), IsSigned(IsSigned), IsEq(IsEq), IsNe(IsNe) {
235-
}
234+
: Coefficients(std::move(Coefficients)), IsSigned(IsSigned), IsEq(IsEq),
235+
IsNe(IsNe) {}
236236

237237
unsigned size() const { return Coefficients.size(); }
238238

0 commit comments

Comments
 (0)