[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineInstr.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Oct 27 22:31:01 PST 2002
Changes in directory llvm/include/llvm/CodeGen:
MachineInstr.h updated: 1.71 -> 1.72
---
Log message:
Add new getOperandType(i) method to MachineInstr
---
Diffs of the changes:
Index: llvm/include/llvm/CodeGen/MachineInstr.h
diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.71 llvm/include/llvm/CodeGen/MachineInstr.h:1.72
--- llvm/include/llvm/CodeGen/MachineInstr.h:1.71 Sun Oct 27 22:24:46 2002
+++ llvm/include/llvm/CodeGen/MachineInstr.h Sun Oct 27 22:30:20 2002
@@ -238,14 +238,6 @@
//
unsigned getNumOperands() const { return operands.size(); }
- bool operandIsDefined(unsigned i) const {
- return getOperand(i).opIsDef();
- }
-
- bool operandIsDefinedAndUsed(unsigned i) const {
- return getOperand(i).opIsDefAndUse();
- }
-
const MachineOperand& getOperand(unsigned i) const {
assert(i < operands.size() && "getOperand() out of range!");
return operands[i];
@@ -254,6 +246,18 @@
assert(i < operands.size() && "getOperand() out of range!");
return operands[i];
}
+
+ MachineOperand::MachineOperandType getOperandType(unsigned i) const {
+ return getOperand(i).getOperandType();
+ }
+
+ bool operandIsDefined(unsigned i) const {
+ return getOperand(i).opIsDef();
+ }
+
+ bool operandIsDefinedAndUsed(unsigned i) const {
+ return getOperand(i).opIsDefAndUse();
+ }
//
// Information about implicit operands of the instruction
@@ -339,7 +343,7 @@
// physical register after register allocation is complete.
//
void SetRegForOperand(unsigned i, int regNum);
-
+
//
// Iterator to enumerate machine operands.
//
@@ -348,10 +352,10 @@
unsigned i;
MITy MI;
- inline void skipToNextVal() {
+ void skipToNextVal() {
while (i < MI->getNumOperands() &&
- !((MI->getOperand(i).getOperandType() == MachineOperand::MO_VirtualRegister ||
- MI->getOperand(i).getOperandType() == MachineOperand::MO_CCRegister)
+ !((MI->getOperandType(i) == MachineOperand::MO_VirtualRegister ||
+ MI->getOperandType(i) == MachineOperand::MO_CCRegister)
&& MI->getOperand(i).getVRegValue() != 0))
++i;
}
More information about the llvm-commits
mailing list