diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-02-10 21:12:22 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-02-10 21:12:22 +0000 |
| commit | 1cbe4d0ad0888e50858cca83cf2a0d3083709513 (patch) | |
| tree | 24da2df5bf601e7788e45d0fb9acad917b7060c2 /lib/CodeGen/RegAllocLinearScan.cpp | |
| parent | 9d58a500fc1b13651eae0f0cc015ae0b02e14a13 (diff) | |
Do not use MachineOperand::isVirtualRegister either!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLinearScan.cpp')
| -rw-r--r-- | lib/CodeGen/RegAllocLinearScan.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index 42b8ae3aba..9df824abc3 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/lib/CodeGen/RegAllocLinearScan.cpp @@ -405,8 +405,9 @@ bool RA::runOnMachineFunction(MachineFunction &fn) { for (unsigned i = 0, e = (*currentInstr_)->getNumOperands(); i != e; ++i) { MachineOperand& op = (*currentInstr_)->getOperand(i); - if (op.isVirtualRegister()) { - unsigned virtReg = op.getAllocatedRegNum(); + if (op.isRegister() && + MRegisterInfo::isVirtualRegister(op.getReg())) { + unsigned virtReg = op.getReg(); Virt2PhysMap::const_iterator it = v2pMap_.find(virtReg); if (it != v2pMap_.end()) { DEBUG(std::cerr << "\t\t\t%reg" << it->first @@ -441,7 +442,8 @@ bool RA::runOnMachineFunction(MachineFunction &fn) { "registers:\n"); for (unsigned i = 0; i != numOperands; ++i) { MachineOperand& op = (*currentInstr_)->getOperand(i); - if (op.isVirtualRegister() && op.isUse()) { + if (op.isRegister() && op.isUse() && + MRegisterInfo::isVirtualRegister(op.getReg())) { unsigned virtReg = op.getAllocatedRegNum(); unsigned physReg = 0; Virt2PhysMap::iterator it = v2pMap_.find(virtReg); @@ -471,9 +473,10 @@ bool RA::runOnMachineFunction(MachineFunction &fn) { "registers:\n"); for (unsigned i = 0; i != numOperands; ++i) { MachineOperand& op = (*currentInstr_)->getOperand(i); - if (op.isVirtualRegister()) { + if (op.isRegister() && + MRegisterInfo::isVirtualRegister(op.getReg())) { assert(!op.isUse() && "we should not have uses here!"); - unsigned virtReg = op.getAllocatedRegNum(); + unsigned virtReg = op.getReg(); unsigned physReg = 0; Virt2PhysMap::iterator it = v2pMap_.find(virtReg); if (it != v2pMap_.end()) { |
