Skip to content

Commit a6f87ab

Browse files
[Mips] Remove a trivial variable (NFC) (#105940)
We assign I->getNumOperands() to J and immediately print that out as a debug message. We don't need to keep J across iterations.
1 parent b9a0276 commit a6f87ab

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/Target/Mips/MipsConstantIslandPass.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,8 +1630,6 @@ MipsConstantIslands::fixupConditionalBr(ImmBranch &Br) {
16301630
}
16311631

16321632
void MipsConstantIslands::prescanForConstants() {
1633-
unsigned J = 0;
1634-
(void)J;
16351633
for (MachineBasicBlock &B : *MF) {
16361634
for (MachineBasicBlock::instr_iterator I = B.instr_begin(),
16371635
EB = B.instr_end();
@@ -1640,8 +1638,7 @@ void MipsConstantIslands::prescanForConstants() {
16401638
case Mips::LwConstant32: {
16411639
PrescannedForConstants = true;
16421640
LLVM_DEBUG(dbgs() << "constant island constant " << *I << "\n");
1643-
J = I->getNumOperands();
1644-
LLVM_DEBUG(dbgs() << "num operands " << J << "\n");
1641+
LLVM_DEBUG(dbgs() << "num operands " << I->getNumOperands() << "\n");
16451642
MachineOperand& Literal = I->getOperand(1);
16461643
if (Literal.isImm()) {
16471644
int64_t V = Literal.getImm();

0 commit comments

Comments
 (0)