mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
Simplify some code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25924 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -593,7 +593,6 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, const VirtRegMap &VRM) {
|
||||
if (MO.isRegister() && MO.getReg() && MO.isDef()) {
|
||||
unsigned VirtReg = MO.getReg();
|
||||
|
||||
bool TakenCareOf = false;
|
||||
if (!MRegisterInfo::isVirtualRegister(VirtReg)) {
|
||||
// Check to see if this is a def-and-use vreg operand that we do need
|
||||
// to insert a store for.
|
||||
@@ -609,11 +608,10 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, const VirtRegMap &VRM) {
|
||||
|
||||
if (!OpTakenCareOf) {
|
||||
ClobberPhysReg(VirtReg, SpillSlotsAvailable, PhysRegsAvailable);
|
||||
TakenCareOf = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (!TakenCareOf) {
|
||||
// The only vregs left are stack slot definitions.
|
||||
int StackSlot = VRM.getStackSlot(VirtReg);
|
||||
const TargetRegisterClass *RC =
|
||||
@@ -653,10 +651,7 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, const VirtRegMap &VRM) {
|
||||
DEBUG(std::cerr << "Updating SS#" << StackSlot <<" in physreg "
|
||||
<< MRI->getName(PhysReg) << " for virtreg #"
|
||||
<< VirtReg << "\n");
|
||||
|
||||
++NumStores;
|
||||
VirtReg = PhysReg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user