[llvm-commits] CVS: llvm/lib/Target/TargetInstrInfo.cpp
Evan Cheng
evan.cheng at apple.com
Fri Dec 8 10:45:29 PST 2006
Changes in directory llvm/lib/Target:
TargetInstrInfo.cpp updated: 1.25 -> 1.26
---
Log message:
Move findTiedToSrcOperand to TargetInstrDescriptor.
---
Diffs of the changes: (+11 -12)
TargetInstrInfo.cpp | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
Index: llvm/lib/Target/TargetInstrInfo.cpp
diff -u llvm/lib/Target/TargetInstrInfo.cpp:1.25 llvm/lib/Target/TargetInstrInfo.cpp:1.26
--- llvm/lib/Target/TargetInstrInfo.cpp:1.25 Fri Dec 8 01:57:56 2006
+++ llvm/lib/Target/TargetInstrInfo.cpp Fri Dec 8 12:45:14 2006
@@ -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 {
More information about the llvm-commits
mailing list