mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
Remove getAllocatedRegNum(). Use getReg() instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11393 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -173,7 +173,7 @@ void RegAllocSimple::AllocateBasicBlock(MachineBasicBlock &MBB) {
|
||||
MachineOperand &op = MI->getOperand(i);
|
||||
|
||||
if (op.isRegister() && MRegisterInfo::isVirtualRegister(op.getReg())) {
|
||||
unsigned virtualReg = (unsigned) op.getAllocatedRegNum();
|
||||
unsigned virtualReg = (unsigned) op.getReg();
|
||||
DEBUG(std::cerr << "op: " << op << "\n");
|
||||
DEBUG(std::cerr << "\t inst[" << i << "]: ";
|
||||
MI->print(std::cerr, *TM));
|
||||
@@ -187,11 +187,11 @@ void RegAllocSimple::AllocateBasicBlock(MachineBasicBlock &MBB) {
|
||||
// must be same register number as the first operand
|
||||
// This maps a = b + c into b += c, and saves b into a's spot
|
||||
assert(MI->getOperand(1).isRegister() &&
|
||||
MI->getOperand(1).getAllocatedRegNum() &&
|
||||
MI->getOperand(1).getReg() &&
|
||||
MI->getOperand(1).isUse() &&
|
||||
"Two address instruction invalid!");
|
||||
|
||||
physReg = MI->getOperand(1).getAllocatedRegNum();
|
||||
physReg = MI->getOperand(1).getReg();
|
||||
} else {
|
||||
physReg = getFreeReg(virtualReg);
|
||||
}
|
||||
@@ -205,7 +205,7 @@ void RegAllocSimple::AllocateBasicBlock(MachineBasicBlock &MBB) {
|
||||
}
|
||||
MI->SetMachineOperandReg(i, physReg);
|
||||
DEBUG(std::cerr << "virt: " << virtualReg <<
|
||||
", phys: " << op.getAllocatedRegNum() << "\n");
|
||||
", phys: " << op.getReg() << "\n");
|
||||
}
|
||||
}
|
||||
RegClassIdx.clear();
|
||||
|
||||
Reference in New Issue
Block a user