mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Improving the name of the function parameter, which happens to solve two likely-less-than-useful MSVC warnings: warning C4258: 'I' : definition from the for loop is ignored; the definition from the enclosing scope is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214717 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d5e9497c88
commit
c245c18ba3
@ -1296,11 +1296,11 @@ void FPS::handleCondMovFP(MachineBasicBlock::iterator &I) {
|
|||||||
/// floating point instructions. This is primarily intended for use by pseudo
|
/// floating point instructions. This is primarily intended for use by pseudo
|
||||||
/// instructions.
|
/// instructions.
|
||||||
///
|
///
|
||||||
void FPS::handleSpecialFP(MachineBasicBlock::iterator &I) {
|
void FPS::handleSpecialFP(MachineBasicBlock::iterator &Inst) {
|
||||||
MachineInstr *MI = I;
|
MachineInstr *MI = Inst;
|
||||||
|
|
||||||
if (MI->isCall()) {
|
if (MI->isCall()) {
|
||||||
handleCall(I);
|
handleCall(Inst);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1325,7 +1325,7 @@ void FPS::handleSpecialFP(MachineBasicBlock::iterator &I) {
|
|||||||
} else {
|
} else {
|
||||||
// For COPY we just duplicate the specified value to a new stack slot.
|
// For COPY we just duplicate the specified value to a new stack slot.
|
||||||
// This could be made better, but would require substantial changes.
|
// This could be made better, but would require substantial changes.
|
||||||
duplicateToTop(SrcFP, DstFP, I);
|
duplicateToTop(SrcFP, DstFP, Inst);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1334,7 +1334,7 @@ void FPS::handleSpecialFP(MachineBasicBlock::iterator &I) {
|
|||||||
// All FP registers must be explicitly defined, so load a 0 instead.
|
// All FP registers must be explicitly defined, so load a 0 instead.
|
||||||
unsigned Reg = MI->getOperand(0).getReg() - X86::FP0;
|
unsigned Reg = MI->getOperand(0).getReg() - X86::FP0;
|
||||||
DEBUG(dbgs() << "Emitting LD_F0 for implicit FP" << Reg << '\n');
|
DEBUG(dbgs() << "Emitting LD_F0 for implicit FP" << Reg << '\n');
|
||||||
BuildMI(*MBB, I, MI->getDebugLoc(), TII->get(X86::LD_F0));
|
BuildMI(*MBB, Inst, MI->getDebugLoc(), TII->get(X86::LD_F0));
|
||||||
pushReg(Reg);
|
pushReg(Reg);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1476,7 +1476,7 @@ void FPS::handleSpecialFP(MachineBasicBlock::iterator &I) {
|
|||||||
for (unsigned I = 0; I < NumSTUses; ++I)
|
for (unsigned I = 0; I < NumSTUses; ++I)
|
||||||
STUsesArray[I] = I;
|
STUsesArray[I] = I;
|
||||||
|
|
||||||
shuffleStackTop(STUsesArray, NumSTUses, I);
|
shuffleStackTop(STUsesArray, NumSTUses, Inst);
|
||||||
DEBUG({dbgs() << "Before asm: "; dumpStack();});
|
DEBUG({dbgs() << "Before asm: "; dumpStack();});
|
||||||
|
|
||||||
// With the stack layout fixed, rewrite the FP registers.
|
// With the stack layout fixed, rewrite the FP registers.
|
||||||
@ -1511,7 +1511,7 @@ void FPS::handleSpecialFP(MachineBasicBlock::iterator &I) {
|
|||||||
while (FPKills) {
|
while (FPKills) {
|
||||||
unsigned FPReg = countTrailingZeros(FPKills);
|
unsigned FPReg = countTrailingZeros(FPKills);
|
||||||
if (isLive(FPReg))
|
if (isLive(FPReg))
|
||||||
freeStackSlotAfter(I, FPReg);
|
freeStackSlotAfter(Inst, FPReg);
|
||||||
FPKills &= ~(1U << FPReg);
|
FPKills &= ~(1U << FPReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1527,12 +1527,12 @@ void FPS::handleSpecialFP(MachineBasicBlock::iterator &I) {
|
|||||||
Op.getReg() >= X86::FP0 && Op.getReg() <= X86::FP6);
|
Op.getReg() >= X86::FP0 && Op.getReg() <= X86::FP6);
|
||||||
unsigned FPReg = getFPReg(Op);
|
unsigned FPReg = getFPReg(Op);
|
||||||
if (Op.isKill())
|
if (Op.isKill())
|
||||||
moveToTop(FPReg, I);
|
moveToTop(FPReg, Inst);
|
||||||
else
|
else
|
||||||
duplicateToTop(FPReg, FPReg, I);
|
duplicateToTop(FPReg, FPReg, Inst);
|
||||||
|
|
||||||
// Emit the call. This will pop the operand.
|
// Emit the call. This will pop the operand.
|
||||||
BuildMI(*MBB, I, MI->getDebugLoc(), TII->get(X86::CALLpcrel32))
|
BuildMI(*MBB, Inst, MI->getDebugLoc(), TII->get(X86::CALLpcrel32))
|
||||||
.addExternalSymbol("_ftol2")
|
.addExternalSymbol("_ftol2")
|
||||||
.addReg(X86::ST0, RegState::ImplicitKill)
|
.addReg(X86::ST0, RegState::ImplicitKill)
|
||||||
.addReg(X86::ECX, RegState::ImplicitDefine)
|
.addReg(X86::ECX, RegState::ImplicitDefine)
|
||||||
@ -1633,15 +1633,15 @@ void FPS::handleSpecialFP(MachineBasicBlock::iterator &I) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
I = MBB->erase(I); // Remove the pseudo instruction
|
Inst = MBB->erase(Inst); // Remove the pseudo instruction
|
||||||
|
|
||||||
// We want to leave I pointing to the previous instruction, but what if we
|
// We want to leave I pointing to the previous instruction, but what if we
|
||||||
// just erased the first instruction?
|
// just erased the first instruction?
|
||||||
if (I == MBB->begin()) {
|
if (Inst == MBB->begin()) {
|
||||||
DEBUG(dbgs() << "Inserting dummy KILL\n");
|
DEBUG(dbgs() << "Inserting dummy KILL\n");
|
||||||
I = BuildMI(*MBB, I, DebugLoc(), TII->get(TargetOpcode::KILL));
|
Inst = BuildMI(*MBB, Inst, DebugLoc(), TII->get(TargetOpcode::KILL));
|
||||||
} else
|
} else
|
||||||
--I;
|
--Inst;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FPS::setKillFlags(MachineBasicBlock &MBB) const {
|
void FPS::setKillFlags(MachineBasicBlock &MBB) const {
|
||||||
|
Loading…
Reference in New Issue
Block a user