/// printImplicitDef - This method prints the specified machine instruction
/// that is an implicit def.
virtual void printImplicitDef(const MachineInstr *MI) const;
-
-
+
+ /// printKill - This method prints the specified kill machine instruction.
+ virtual void printKill(const MachineInstr *MI) const;
+
/// printPICJumpTableSetLabel - This method prints a set label for the
/// specified MachineBasicBlock for a jumptable entry.
virtual void printPICJumpTableSetLabel(unsigned uid,
<< TRI->getName(MI->getOperand(0).getReg());
}
+void AsmPrinter::printKill(const MachineInstr *MI) const {
+ if (!VerboseAsm) return;
+ O.PadToColumn(MAI->getCommentColumn());
+ O << MAI->getCommentString() << " kill:";
+ for (unsigned n = 0, e = MI->getNumOperands(); n != e; ++n) {
+ const MachineOperand &op = MI->getOperand(n);
+ assert(op.isReg() && "KILL instruction must have only register operands");
+ O << ' ' << TRI->getName(op.getReg()) << (op.isDef() ? "<def>" : "<kill>");
+ }
+}
+
/// printLabel - This method prints a local label used by debug and
/// exception handling tables.
void AsmPrinter::printLabel(const MachineInstr *MI) const {