[llvm-commits] CVS: llvm/lib/Target/TargetInstrInfo.cpp

Evan Cheng evan.cheng at apple.com
Thu Dec 7 23:58:11 PST 2006



Changes in directory llvm/lib/Target:

TargetInstrInfo.cpp updated: 1.24 -> 1.25
---
Log message:

Use MI's TargetInstrDescriptor.

---
Diffs of the changes:  (+4 -5)

 TargetInstrInfo.cpp |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)


Index: llvm/lib/Target/TargetInstrInfo.cpp
diff -u llvm/lib/Target/TargetInstrInfo.cpp:1.24 llvm/lib/Target/TargetInstrInfo.cpp:1.25
--- llvm/lib/Target/TargetInstrInfo.cpp:1.24	Fri Dec  1 15:50:57 2006
+++ llvm/lib/Target/TargetInstrInfo.cpp	Fri Dec  8 01:57:56 2006
@@ -27,13 +27,12 @@
 
 /// 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;






More information about the llvm-commits mailing list