diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-12-08 07:57:56 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-12-08 07:57:56 +0000 |
commit | 3cc3816cd4dc92fbb0a2de93bdebb68dfcea31d5 (patch) | |
tree | 2774eaba9b1ae1d1515aa286561c6bbf4bb5a906 | |
parent | c5f8e4f13406c86785069839c1edfb86ae767e63 (diff) | |
download | external_llvm-3cc3816cd4dc92fbb0a2de93bdebb68dfcea31d5.zip external_llvm-3cc3816cd4dc92fbb0a2de93bdebb68dfcea31d5.tar.gz external_llvm-3cc3816cd4dc92fbb0a2de93bdebb68dfcea31d5.tar.bz2 |
Use MI's TargetInstrDescriptor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32352 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/TargetInstrInfo.h | 3 | ||||
-rw-r--r-- | lib/Target/TargetInstrInfo.cpp | 9 |
2 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h index 210f3b1..312e6c3 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/include/llvm/Target/TargetInstrInfo.h @@ -259,7 +259,8 @@ public: /// findTiedToSrcOperand - Returns the operand that is tied to the specified /// dest operand. Returns -1 if there isn't one. - int findTiedToSrcOperand(MachineOpCode Opcode, unsigned OpNum) const; + int findTiedToSrcOperand(const TargetInstrDescriptor *TID, + unsigned OpNum) const; /// getDWARF_LABELOpcode - Return the opcode of the target's DWARF_LABEL /// instruction if it has one. This is used by codegen passes that update diff --git a/lib/Target/TargetInstrInfo.cpp b/lib/Target/TargetInstrInfo.cpp index c29b1c5..0e79baa 100644 --- a/lib/Target/TargetInstrInfo.cpp +++ b/lib/Target/TargetInstrInfo.cpp @@ -27,13 +27,12 @@ TargetInstrInfo::~TargetInstrInfo() { /// findTiedToSrcOperand - Returns the operand that is tied to the specified /// dest operand. Returns -1 if there isn't one. -int -TargetInstrInfo::findTiedToSrcOperand(MachineOpCode Opc, unsigned OpNum) const { - for (unsigned i = 0, e = getNumOperands(Opc); i != e; ++i) { +int TargetInstrInfo::findTiedToSrcOperand(const TargetInstrDescriptor *TID, + unsigned OpNum) const { + for (unsigned i = 0, e = TID->numOperands; i != e; ++i) { if (i == OpNum) continue; - int ti = getOperandConstraint(Opc, i, TOI::TIED_TO); - if (ti == (int)OpNum) + if (TID->getOperandConstraint(i, TOI::TIED_TO) == (int)OpNum) return i; } return -1; |