summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-12-08 07:57:56 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-12-08 07:57:56 +0000
commitb5f1c22e94a7989198e6e4480056c48dc0f28ecb (patch)
tree2512ef3766e2d0233601a36a426e84c7b4549a1b /llvm
parent5040f58ae437ccdf0fd97b418a3cc08c2f4b83c4 (diff)
downloadbcm5719-llvm-b5f1c22e94a7989198e6e4480056c48dc0f28ecb.tar.gz
bcm5719-llvm-b5f1c22e94a7989198e6e4480056c48dc0f28ecb.zip
Use MI's TargetInstrDescriptor.
llvm-svn: 32352
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Target/TargetInstrInfo.h3
-rw-r--r--llvm/lib/Target/TargetInstrInfo.cpp9
2 files changed, 6 insertions, 6 deletions
diff --git a/llvm/include/llvm/Target/TargetInstrInfo.h b/llvm/include/llvm/Target/TargetInstrInfo.h
index 210f3b1f8a2..312e6c33dd8 100644
--- a/llvm/include/llvm/Target/TargetInstrInfo.h
+++ b/llvm/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/llvm/lib/Target/TargetInstrInfo.cpp b/llvm/lib/Target/TargetInstrInfo.cpp
index c29b1c54b4f..0e79baac7c9 100644
--- a/llvm/lib/Target/TargetInstrInfo.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud