diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-01-01 02:55:32 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-01-01 02:55:32 +0000 |
| commit | 6c5757e4e85bb190097be13c1630bb107a1fbcfe (patch) | |
| tree | 2e72d5f19ba1b2a49b0eec44caea6c2595b41c63 /include/llvm/CodeGen/MachineOperand.h | |
| parent | 4c07450305ba90724dcd3fd419cbeb8ae09e45a6 (diff) | |
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
Diffstat (limited to 'include/llvm/CodeGen/MachineOperand.h')
| -rw-r--r-- | include/llvm/CodeGen/MachineOperand.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 |
