Skip to content

Commit 9ae86a7

Browse files
author
git apple-llvm automerger
committed
Merge commit '87b1d3537ae6' from llvm.org/main into next
2 parents 7287bce + 87b1d35 commit 9ae86a7

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6764,7 +6764,7 @@ bool AMDGPUInstructionSelector::selectSGetBarrierState(
67646764
MachineInstr &I, Intrinsic::ID IntrID) const {
67656765
MachineBasicBlock *MBB = I.getParent();
67666766
const DebugLoc &DL = I.getDebugLoc();
6767-
MachineOperand BarOp = I.getOperand(2);
6767+
const MachineOperand &BarOp = I.getOperand(2);
67686768
std::optional<int64_t> BarValImm =
67696769
getIConstantVRegSExtVal(BarOp.getReg(), *MRI);
67706770

@@ -6817,8 +6817,8 @@ bool AMDGPUInstructionSelector::selectNamedBarrierInit(
68176817
MachineInstr &I, Intrinsic::ID IntrID) const {
68186818
MachineBasicBlock *MBB = I.getParent();
68196819
const DebugLoc &DL = I.getDebugLoc();
6820-
MachineOperand BarOp = I.getOperand(1);
6821-
MachineOperand CntOp = I.getOperand(2);
6820+
const MachineOperand &BarOp = I.getOperand(1);
6821+
const MachineOperand &CntOp = I.getOperand(2);
68226822

68236823
// BarID = (BarOp >> 4) & 0x3F
68246824
Register TmpReg0 = MRI->createVirtualRegister(&AMDGPU::SReg_32RegClass);

llvm/lib/Target/AMDGPU/GCNPreRAOptimizations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ bool GCNPreRAOptimizationsImpl::processReg(Register Reg) {
136136
continue;
137137

138138
if (Def.getOpcode() == AMDGPU::V_ACCVGPR_WRITE_B32_e64) {
139-
MachineOperand DefSrcMO = Def.getOperand(1);
139+
const MachineOperand &DefSrcMO = Def.getOperand(1);
140140

141141
// Immediates are not an issue and can be propagated in
142142
// postrapseudos pass. Only handle cases where defining

llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7945,7 +7945,7 @@ void SIInstrInfo::moveToVALUImpl(SIInstrWorklist &Worklist,
79457945
}
79467946
legalizeOperands(*NewInstr, MDT);
79477947
int SCCIdx = Inst.findRegisterDefOperandIdx(AMDGPU::SCC, /*TRI=*/nullptr);
7948-
MachineOperand SCCOp = Inst.getOperand(SCCIdx);
7948+
const MachineOperand &SCCOp = Inst.getOperand(SCCIdx);
79497949
addSCCDefUsersToVALUWorklist(SCCOp, Inst, Worklist, CondReg);
79507950
Inst.eraseFromParent();
79517951
return;
@@ -7985,7 +7985,7 @@ void SIInstrInfo::moveToVALUImpl(SIInstrWorklist &Worklist,
79857985
legalizeOperandsVALUt16(*NewInstr, MRI);
79867986
legalizeOperands(*NewInstr, MDT);
79877987
int SCCIdx = Inst.findRegisterDefOperandIdx(AMDGPU::SCC, /*TRI=*/nullptr);
7988-
MachineOperand SCCOp = Inst.getOperand(SCCIdx);
7988+
const MachineOperand &SCCOp = Inst.getOperand(SCCIdx);
79897989
addSCCDefUsersToVALUWorklist(SCCOp, Inst, Worklist, CondReg);
79907990
Inst.eraseFromParent();
79917991
return;
@@ -8183,7 +8183,7 @@ void SIInstrInfo::moveToVALUImpl(SIInstrWorklist &Worklist,
81838183
AMDGPU::OpName::src0_modifiers) >= 0)
81848184
NewInstr.addImm(0);
81858185
if (AMDGPU::hasNamedOperand(NewOpcode, AMDGPU::OpName::src0)) {
8186-
MachineOperand Src = Inst.getOperand(1);
8186+
const MachineOperand &Src = Inst.getOperand(1);
81878187
NewInstr->addOperand(Src);
81888188
}
81898189

@@ -9199,7 +9199,7 @@ void SIInstrInfo::movePackToVALU(SIInstrWorklist &Worklist,
91999199
addUsersToMoveToVALUWorklist(ResultReg, MRI, Worklist);
92009200
}
92019201

9202-
void SIInstrInfo::addSCCDefUsersToVALUWorklist(MachineOperand &Op,
9202+
void SIInstrInfo::addSCCDefUsersToVALUWorklist(const MachineOperand &Op,
92039203
MachineInstr &SCCDefInst,
92049204
SIInstrWorklist &Worklist,
92059205
Register NewCond) const {

llvm/lib/Target/AMDGPU/SIInstrInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class SIInstrInfo final : public AMDGPUGenInstrInfo {
172172
void addUsersToMoveToVALUWorklist(Register Reg, MachineRegisterInfo &MRI,
173173
SIInstrWorklist &Worklist) const;
174174

175-
void addSCCDefUsersToVALUWorklist(MachineOperand &Op,
175+
void addSCCDefUsersToVALUWorklist(const MachineOperand &Op,
176176
MachineInstr &SCCDefInst,
177177
SIInstrWorklist &Worklist,
178178
Register NewCond = Register()) const;

llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ void SIPreEmitPeephole::collectUnpackingCandidates(
640640
}
641641

642642
void SIPreEmitPeephole::performF32Unpacking(MachineInstr &I) {
643-
MachineOperand DstOp = I.getOperand(0);
643+
const MachineOperand &DstOp = I.getOperand(0);
644644

645645
uint16_t UnpackedOpcode = mapToUnpackedOpcode(I);
646646
assert(UnpackedOpcode != std::numeric_limits<uint16_t>::max() &&

0 commit comments

Comments
 (0)