aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/TargetInstrInfo.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-12-08 18:45:48 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-12-08 18:45:48 +0000
commitcc22a7a2adfea3fc318a6d8ca0c692a8e892105b (patch)
treeb8d278f060b0b31ef4360882cab15373769f78a1 /lib/Target/TargetInstrInfo.cpp
parent6ec10ef00ca908e53ee22df013a8c1a5c5d90db9 (diff)
Move findTiedToSrcOperand to TargetInstrDescriptor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32366 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetInstrInfo.cpp')
-rw-r--r--lib/Target/TargetInstrInfo.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/lib/Target/TargetInstrInfo.cpp b/lib/Target/TargetInstrInfo.cpp
index 0e79baac7c..b9fca8a1bf 100644
--- a/lib/Target/TargetInstrInfo.cpp
+++ b/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 {