add efficient iteration support for register use/def's

within a machine function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45479 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2008-01-01 02:55:32 +00:00
parent 4c07450305
commit 6c5757e4e8
2 changed files with 73 additions and 0 deletions

View File

@@ -175,6 +175,13 @@ public:
assert(isRegister() && "Wrong MachineOperand accessor");
return IsKill;
}
/// getNextOperandForReg - Return the next MachineOperand in the function that
/// uses or defines this register.
MachineOperand *getNextOperandForReg() const {
assert(isRegister() && "This is not a register operand!");
return Contents.Reg.Next;
}
//===--------------------------------------------------------------------===//
// Mutators for Register Operands