diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-08-08 23:44:07 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-08-08 23:44:07 +0000 |
commit | fdd6484b41ef0fa7eb8c995fb34b728b193c6258 (patch) | |
tree | 8f3b3303c242bbd4cfa6d5d1a5d5c96b5f4b4837 /include/llvm/CodeGen/MachineOperand.h | |
parent | 0c5f5f4916a5c72b2a6a9cb13f0b2c2add95b6f1 (diff) | |
download | llvm-fdd6484b41ef0fa7eb8c995fb34b728b193c6258.tar.gz llvm-fdd6484b41ef0fa7eb8c995fb34b728b193c6258.tar.bz2 llvm-fdd6484b41ef0fa7eb8c995fb34b728b193c6258.tar.xz |
Move getNextOperandForReg() into MachineRegisterInfo.
MRI provides iterators for traversing the use-def chains. They should
not be accessible from anywhere else.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161543 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineOperand.h')
-rw-r--r-- | include/llvm/CodeGen/MachineOperand.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/include/llvm/CodeGen/MachineOperand.h b/include/llvm/CodeGen/MachineOperand.h index c08b22d105..d3cf090f95 100644 --- a/include/llvm/CodeGen/MachineOperand.h +++ b/include/llvm/CodeGen/MachineOperand.h @@ -138,6 +138,9 @@ private: /// This is valid for all operand types, when the operand is in an instr. MachineInstr *ParentMI; + // MRI accesses Contents.Reg directly. + friend class MachineRegisterInfo; + /// Contents union - This contains the payload for the various operand types. union { MachineBasicBlock *MBB; // For MO_MachineBasicBlock. @@ -305,15 +308,6 @@ public: return !isUndef() && !isInternalRead() && (isUse() || getSubReg()); } - /// getNextOperandForReg - Return the next MachineOperand in the linked list - /// of operands that use or define the same register. - /// Don't call this function directly, see the def-use iterators in - /// MachineRegisterInfo instead. - MachineOperand *getNextOperandForReg() const { - assert(isReg() && "This is not a register operand!"); - return Contents.Reg.Next; - } - //===--------------------------------------------------------------------===// // Mutators for Register Operands //===--------------------------------------------------------------------===// |