mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
Give RemoveRegOperandFromRegInfo a comment and move the
code out of line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69124 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -68,6 +68,21 @@ void MachineOperand::AddRegOperandToRegInfo(MachineRegisterInfo *RegInfo) {
|
||||
*Head = this;
|
||||
}
|
||||
|
||||
/// RemoveRegOperandFromRegInfo - Remove this register operand from the
|
||||
/// MachineRegisterInfo it is linked with.
|
||||
void MachineOperand::RemoveRegOperandFromRegInfo() {
|
||||
assert(isOnRegUseList() && "Reg operand is not on a use list");
|
||||
// Unlink this from the doubly linked list of operands.
|
||||
MachineOperand *NextOp = Contents.Reg.Next;
|
||||
*Contents.Reg.Prev = NextOp;
|
||||
if (NextOp) {
|
||||
assert(NextOp->getReg() == getReg() && "Corrupt reg use/def chain!");
|
||||
NextOp->Contents.Reg.Prev = Contents.Reg.Prev;
|
||||
}
|
||||
Contents.Reg.Prev = 0;
|
||||
Contents.Reg.Next = 0;
|
||||
}
|
||||
|
||||
void MachineOperand::setReg(unsigned Reg) {
|
||||
if (getReg() == Reg) return; // No change.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user