Skip to content

Commit 38f996b

Browse files
authored
Replace copy with a reference. (#87975)
1 parent fc9a507 commit 38f996b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/MachinePipeliner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,7 @@ class HighRegisterPressureDetector {
12471247
for (auto &MI : *OrigMBB) {
12481248
if (MI.isDebugInstr())
12491249
continue;
1250-
for (auto Use : ROMap[&MI].Uses) {
1250+
for (auto &Use : ROMap[&MI].Uses) {
12511251
auto Reg = Use.RegUnit;
12521252
// Ignore the variable that appears only on one side of phi instruction
12531253
// because it's used only at the first iteration.
@@ -1345,7 +1345,7 @@ class HighRegisterPressureDetector {
13451345

13461346
DenseMap<Register, MachineInstr *> LastUseMI;
13471347
for (MachineInstr *MI : llvm::reverse(OrderedInsts)) {
1348-
for (auto Use : ROMap.find(MI)->getSecond().Uses) {
1348+
for (auto &Use : ROMap.find(MI)->getSecond().Uses) {
13491349
auto Reg = Use.RegUnit;
13501350
if (!TargetRegs.contains(Reg))
13511351
continue;

0 commit comments

Comments
 (0)