From 6c5757e4e85bb190097be13c1630bb107a1fbcfe Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 1 Jan 2008 02:55:32 +0000 Subject: 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 --- include/llvm/CodeGen/MachineOperand.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/llvm/CodeGen/MachineOperand.h') diff --git a/include/llvm/CodeGen/MachineOperand.h b/include/llvm/CodeGen/MachineOperand.h index 66f106a401..a782ff538c 100644 --- a/include/llvm/CodeGen/MachineOperand.h +++ b/include/llvm/CodeGen/MachineOperand.h @@ -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 -- cgit v1.2.3-70-g09d2