Skip to content

Commit

Permalink
[Mips] Remove a trivial variable (NFC) (llvm#105940)
Browse files Browse the repository at this point in the history
We assign I->getNumOperands() to J and immediately print that out as a
debug message.  We don't need to keep J across iterations.
  • Loading branch information
kazutakahirata authored and dmpolukhin committed Sep 2, 2024
1 parent 8ab2712 commit c9037ec
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions llvm/lib/Target/Mips/MipsConstantIslandPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1630,8 +1630,6 @@ MipsConstantIslands::fixupConditionalBr(ImmBranch &Br) {
}

void MipsConstantIslands::prescanForConstants() {
unsigned J = 0;
(void)J;
for (MachineBasicBlock &B : *MF) {
for (MachineBasicBlock::instr_iterator I = B.instr_begin(),
EB = B.instr_end();
Expand All @@ -1640,8 +1638,7 @@ void MipsConstantIslands::prescanForConstants() {
case Mips::LwConstant32: {
PrescannedForConstants = true;
LLVM_DEBUG(dbgs() << "constant island constant " << *I << "\n");
J = I->getNumOperands();
LLVM_DEBUG(dbgs() << "num operands " << J << "\n");
LLVM_DEBUG(dbgs() << "num operands " << I->getNumOperands() << "\n");
MachineOperand& Literal = I->getOperand(1);
if (Literal.isImm()) {
int64_t V = Literal.getImm();
Expand Down

0 comments on commit c9037ec

Please sign in to comment.