diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-12-08 18:45:48 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-12-08 18:45:48 +0000 |
commit | 78cb08d082d86dec1292f5a7416e3adbc3852a97 (patch) | |
tree | cc43bf1583d7b20b1bb644ccef9c490a66e21998 /llvm/lib/Target/TargetInstrInfo.cpp | |
parent | ae5733ba6a09c6a5dd3e5ce8317204eb72a44d12 (diff) | |
download | bcm5719-llvm-78cb08d082d86dec1292f5a7416e3adbc3852a97.tar.gz bcm5719-llvm-78cb08d082d86dec1292f5a7416e3adbc3852a97.zip |
Move findTiedToSrcOperand to TargetInstrDescriptor.
llvm-svn: 32366
Diffstat (limited to 'llvm/lib/Target/TargetInstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/TargetInstrInfo.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/llvm/lib/Target/TargetInstrInfo.cpp b/llvm/lib/Target/TargetInstrInfo.cpp index 0e79baac7c9..b9fca8a1bfd 100644 --- a/llvm/lib/Target/TargetInstrInfo.cpp +++ b/llvm/lib/Target/TargetInstrInfo.cpp @@ -17,28 +17,27 @@ #include "llvm/DerivedTypes.h" using namespace llvm; -TargetInstrInfo::TargetInstrInfo(const TargetInstrDescriptor* Desc, - unsigned numOpcodes) - : desc(Desc), NumOpcodes(numOpcodes) { -} - -TargetInstrInfo::~TargetInstrInfo() { -} - /// findTiedToSrcOperand - Returns the operand that is tied to the specified /// dest operand. Returns -1 if there isn't one. -int TargetInstrInfo::findTiedToSrcOperand(const TargetInstrDescriptor *TID, - unsigned OpNum) const { - for (unsigned i = 0, e = TID->numOperands; i != e; ++i) { +int TargetInstrDescriptor::findTiedToSrcOperand(unsigned OpNum) const { + for (unsigned i = 0, e = numOperands; i != e; ++i) { if (i == OpNum) continue; - if (TID->getOperandConstraint(i, TOI::TIED_TO) == (int)OpNum) + if (getOperandConstraint(i, TOI::TIED_TO) == (int)OpNum) return i; } return -1; } +TargetInstrInfo::TargetInstrInfo(const TargetInstrDescriptor* Desc, + unsigned numOpcodes) + : desc(Desc), NumOpcodes(numOpcodes) { +} + +TargetInstrInfo::~TargetInstrInfo() { +} + // commuteInstruction - The default implementation of this method just exchanges // operand 1 and 2. MachineInstr *TargetInstrInfo::commuteInstruction(MachineInstr *MI) const { |