#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/Value.h"
-#include "llvm/Target/MachineInstrInfo.h" // FIXME: shouldn't need this!
#include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/MachineInstrInfo.h"
#include "llvm/Target/MRegisterInfo.h"
using std::cerr;
operands[i].opType = opType;
operands[i].value = V;
operands[i].regNum = -1;
- operands[i].flags = 0;
- if (isdef || TargetInstrDescriptors[opCode].resultPos == (int) i)
- operands[i].markDef();
if (isDefAndUse)
- operands[i].markDefAndUse();
+ operands[i].flags = MachineOperand::DEFUSEFLAG;
+ else if (isdef || TargetInstrDescriptors[opCode].resultPos == (int) i)
+ operands[i].flags = MachineOperand::DEFFLAG;
+ else
+ operands[i].flags = 0;
}
void
operands[i].opType = MachineOperand::MO_MachineRegister;
operands[i].value = NULL;
operands[i].regNum = regNum;
- operands[i].flags = 0;
if (isdef || TargetInstrDescriptors[opCode].resultPos == (int) i)
- operands[i].markDef();
+ operands[i].flags = MachineOperand::DEFFLAG;
+ else
+ operands[i].flags = 0;
+
insertUsedReg(regNum);
}
OS << ")";
}
-void MachineInstr::print(std::ostream &OS, const TargetMachine &TM) {
+void MachineInstr::print(std::ostream &OS, const TargetMachine &TM) const {
unsigned StartOp = 0;
// Specialize printing if op#0 is definition