1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Use MI's TargetInstrDescriptor.

llvm-svn: 32352
This commit is contained in:
Evan Cheng 2006-12-08 07:57:56 +00:00
parent 51a6154ce5
commit dfec38a575
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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;