diff options
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | lib/CodeGen/MachineInstr.cpp | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 2cb5119e49..495da5edfc 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -43,7 +43,7 @@ namespace llvm { /// MachineInstr::MachineInstr(short opcode, unsigned numOperands) : Opcode(opcode), parent(0) { - operands.reserve(numOperands); + Operands.reserve(numOperands); // Make sure that we get added to a machine basicblock LeakDetector::addGarbageObject(this); } @@ -55,7 +55,7 @@ MachineInstr::MachineInstr(MachineBasicBlock *MBB, short opcode, unsigned numOperands) : Opcode(opcode), parent(0) { assert(MBB && "Cannot use inserting ctor with null basic block!"); - operands.reserve(numOperands); + Operands.reserve(numOperands); // Make sure that we get added to a machine basicblock LeakDetector::addGarbageObject(this); MBB->push_back(this); // Add instruction to end of basic block! @@ -65,11 +65,11 @@ MachineInstr::MachineInstr(MachineBasicBlock *MBB, short opcode, /// MachineInstr::MachineInstr(const MachineInstr &MI) { Opcode = MI.getOpcode(); - operands.reserve(MI.getNumOperands()); + Operands.reserve(MI.getNumOperands()); // Add operands - for (unsigned i = 0; i < MI.getNumOperands(); ++i) - operands.push_back(MachineOperand(MI.getOperand(i))); + for (unsigned i = 0; i != MI.getNumOperands(); ++i) + Operands.push_back(MI.getOperand(i)); // Set parent, next, and prev to null parent = 0; @@ -82,13 +82,6 @@ MachineInstr::~MachineInstr() { LeakDetector::removeGarbageObject(this); } -/// clone - Create a copy of 'this' instruction that is identical in all ways -/// except the following: the new instruction has no parent and it has no name -/// -MachineInstr* MachineInstr::clone() const { - return new MachineInstr(*this); -} - /// removeFromParent - This method unlinks 'this' from the containing basic /// block, and returns it, but does not delete it. MachineInstr *MachineInstr::removeFromParent() { @@ -111,15 +104,6 @@ void MachineInstr::dump() const { std::cerr << " " << *this; } -static inline std::ostream& OutputValue(std::ostream &os, const Value* val) { - os << "(val "; - os << (void*) val; // print address always - if (val && val->hasName()) - os << " " << val->getName(); // print name also, if available - os << ")"; - return os; -} - static inline void OutputReg(std::ostream &os, unsigned RegNo, const MRegisterInfo *MRI = 0) { if (!RegNo || MRegisterInfo::isPhysicalRegister(RegNo)) { |