Skip to content

Commit 79ce70b

Browse files
authored
[NFC] Mitigate pointless copies (#95052)
Fixes #95036 #95033 #94933 #94930
1 parent affd73a commit 79ce70b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class DWARFFormValue {
6161
const DWARFUnit *U = nullptr; /// Remember the DWARFUnit at extract time.
6262
const DWARFContext *C = nullptr; /// Context for extract time.
6363

64-
DWARFFormValue(dwarf::Form F, ValueType V) : Form(F), Value(V) {}
64+
DWARFFormValue(dwarf::Form F, const ValueType &V) : Form(F), Value(V) {}
6565

6666
public:
6767
DWARFFormValue(dwarf::Form F = dwarf::Form(0)) : Form(F) {}

llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ struct TargetRegionEntryInfo {
198198
unsigned DeviceID, unsigned FileID,
199199
unsigned Line, unsigned Count);
200200

201-
bool operator<(const TargetRegionEntryInfo RHS) const {
201+
bool operator<(const TargetRegionEntryInfo &RHS) const {
202202
return std::make_tuple(ParentName, DeviceID, FileID, Line, Count) <
203203
std::make_tuple(RHS.ParentName, RHS.DeviceID, RHS.FileID, RHS.Line,
204204
RHS.Count);

llvm/lib/CodeGen/RegAllocGreedy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ class LLVM_LIBRARY_VISIBILITY RAGreedy : public MachineFunctionPass,
425425
ZeroCostFoldedReloads || Copies);
426426
}
427427

428-
void add(RAGreedyStats other) {
428+
void add(const RAGreedyStats &other) {
429429
Reloads += other.Reloads;
430430
FoldedReloads += other.FoldedReloads;
431431
ZeroCostFoldedReloads += other.ZeroCostFoldedReloads;

llvm/lib/ObjCopy/ELF/ELFObject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ class RelocationSection
910910

911911
public:
912912
RelocationSection(const Object &O) : Obj(O) {}
913-
void addRelocation(Relocation Rel) { Relocations.push_back(Rel); }
913+
void addRelocation(const Relocation &Rel) { Relocations.push_back(Rel); }
914914
Error accept(SectionVisitor &Visitor) const override;
915915
Error accept(MutableSectionVisitor &Visitor) override;
916916
Error removeSectionReferences(

0 commit comments

Comments
 (0)