mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 12:26:52 +08:00
Replace copy with a reference. (#87975)
This commit is contained in:
@@ -1247,7 +1247,7 @@ private:
|
||||
for (auto &MI : *OrigMBB) {
|
||||
if (MI.isDebugInstr())
|
||||
continue;
|
||||
for (auto Use : ROMap[&MI].Uses) {
|
||||
for (auto &Use : ROMap[&MI].Uses) {
|
||||
auto Reg = Use.RegUnit;
|
||||
// Ignore the variable that appears only on one side of phi instruction
|
||||
// because it's used only at the first iteration.
|
||||
@@ -1345,7 +1345,7 @@ private:
|
||||
|
||||
DenseMap<Register, MachineInstr *> LastUseMI;
|
||||
for (MachineInstr *MI : llvm::reverse(OrderedInsts)) {
|
||||
for (auto Use : ROMap.find(MI)->getSecond().Uses) {
|
||||
for (auto &Use : ROMap.find(MI)->getSecond().Uses) {
|
||||
auto Reg = Use.RegUnit;
|
||||
if (!TargetRegs.contains(Reg))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user