Skip to content

[NFC] Mitigate pointless copies #95052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class DWARFFormValue {
const DWARFUnit *U = nullptr; /// Remember the DWARFUnit at extract time.
const DWARFContext *C = nullptr; /// Context for extract time.

DWARFFormValue(dwarf::Form F, ValueType V) : Form(F), Value(V) {}
DWARFFormValue(dwarf::Form F, const ValueType &V) : Form(F), Value(V) {}

public:
DWARFFormValue(dwarf::Form F = dwarf::Form(0)) : Form(F) {}
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ struct TargetRegionEntryInfo {
unsigned DeviceID, unsigned FileID,
unsigned Line, unsigned Count);

bool operator<(const TargetRegionEntryInfo RHS) const {
bool operator<(const TargetRegionEntryInfo &RHS) const {
return std::make_tuple(ParentName, DeviceID, FileID, Line, Count) <
std::make_tuple(RHS.ParentName, RHS.DeviceID, RHS.FileID, RHS.Line,
RHS.Count);
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/RegAllocGreedy.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ class LLVM_LIBRARY_VISIBILITY RAGreedy : public MachineFunctionPass,
ZeroCostFoldedReloads || Copies);
}

void add(RAGreedyStats other) {
void add(const RAGreedyStats &other) {
Reloads += other.Reloads;
FoldedReloads += other.FoldedReloads;
ZeroCostFoldedReloads += other.ZeroCostFoldedReloads;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/ObjCopy/ELF/ELFObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ class RelocationSection

public:
RelocationSection(const Object &O) : Obj(O) {}
void addRelocation(Relocation Rel) { Relocations.push_back(Rel); }
void addRelocation(const Relocation &Rel) { Relocations.push_back(Rel); }
Error accept(SectionVisitor &Visitor) const override;
Error accept(MutableSectionVisitor &Visitor) override;
Error removeSectionReferences(
Expand Down
Loading