Skip to content

Commit

Permalink
Replace copy with a reference. (#82485)
Browse files Browse the repository at this point in the history
These are relatively larger structures and we don't update them so ref
should be fine
  • Loading branch information
MalaySanghi committed Mar 5, 2024
1 parent eaa9ef6 commit 0e337c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/CodeGen/MachinePipeliner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ class HighRegisterPressureDetector {
Register Reg = getLoopPhiReg(*MI, OrigMBB);
UpdateTargetRegs(Reg);
} else {
for (auto Use : ROMap.find(MI)->getSecond().Uses)
for (auto &Use : ROMap.find(MI)->getSecond().Uses)
UpdateTargetRegs(Use.RegUnit);
}
}
Expand Down Expand Up @@ -1438,7 +1438,7 @@ class HighRegisterPressureDetector {

const unsigned Iter = I - Stage;

for (auto Def : ROMap.find(MI)->getSecond().Defs)
for (auto &Def : ROMap.find(MI)->getSecond().Defs)
InsertReg(LiveRegSets[Iter], Def.RegUnit);

for (auto LastUse : LastUses[MI]) {
Expand Down

0 comments on commit 0e337c6

Please sign in to comment.